增加出库功能
This commit is contained in:
parent
2b6062b51c
commit
6378186e61
|
|
@ -1,9 +1,6 @@
|
||||||
package com.ruoyi.web.controller.app;
|
package com.ruoyi.web.controller.app;
|
||||||
|
|
||||||
import com.ruoyi.app.domain.AppLocation;
|
import com.ruoyi.app.domain.*;
|
||||||
import com.ruoyi.app.domain.AppPendingStorage;
|
|
||||||
import com.ruoyi.app.domain.AppPmsOrderIn;
|
|
||||||
import com.ruoyi.app.domain.AppTask;
|
|
||||||
import com.ruoyi.app.service.IAppPendingStorageService;
|
import com.ruoyi.app.service.IAppPendingStorageService;
|
||||||
import com.ruoyi.app.service.IAppPmsOrderInService;
|
import com.ruoyi.app.service.IAppPmsOrderInService;
|
||||||
import com.ruoyi.app.service.IAppPmsOrderOutService;
|
import com.ruoyi.app.service.IAppPmsOrderOutService;
|
||||||
|
|
@ -37,8 +34,7 @@ import java.util.*;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/app/pms")
|
@RequestMapping("/app/pms")
|
||||||
public class AppPmsController extends BaseController
|
public class AppPmsController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAppPmsOrderInService appPmsOrderInService;// 入库单
|
private IAppPmsOrderInService appPmsOrderInService;// 入库单
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -56,8 +52,7 @@ public class AppPmsController extends BaseController
|
||||||
@Log(title = "Pms入库单请求", skipAuth = true)
|
@Log(title = "Pms入库单请求", skipAuth = true)
|
||||||
@PostMapping("/orderIn")
|
@PostMapping("/orderIn")
|
||||||
@Anonymous
|
@Anonymous
|
||||||
public AjaxResult pmsOrderIn(@RequestBody PmsOrderInRequest orderInRequest)
|
public AjaxResult pmsOrderIn(@RequestBody PmsOrderInRequest orderInRequest) {
|
||||||
{
|
|
||||||
// TODO
|
// TODO
|
||||||
// 判断数据是否缺失
|
// 判断数据是否缺失
|
||||||
Integer orderType = orderInRequest.getOrderType();
|
Integer orderType = orderInRequest.getOrderType();
|
||||||
|
|
@ -103,13 +98,32 @@ public class AppPmsController extends BaseController
|
||||||
@Log(title = "Pms出库单请求", skipAuth = true)
|
@Log(title = "Pms出库单请求", skipAuth = true)
|
||||||
@PostMapping("/orderOut")
|
@PostMapping("/orderOut")
|
||||||
@Anonymous
|
@Anonymous
|
||||||
public AjaxResult pmsOrderOut(@RequestBody PmsOrderOutRequest orderOutRequest)
|
public AjaxResult pmsOrderOut(@RequestBody PmsOrderOutRequest orderOutRequest) {
|
||||||
{
|
|
||||||
// TODO
|
// TODO
|
||||||
|
// 判断请求数据完整性
|
||||||
|
if (StringUtils.isEmpty(orderOutRequest.getListId())
|
||||||
|
|| orderOutRequest.getOrderType() == null
|
||||||
|
|| StringUtils.isEmpty(orderOutRequest.getCustomerId())
|
||||||
|
|| StringUtils.isEmpty(orderOutRequest.getGoodsId())
|
||||||
|
|| orderOutRequest.getGoodsNum() == null
|
||||||
|
|| StringUtils.isEmpty(orderOutRequest.getGoodsDesc())) {
|
||||||
|
return error("请求数据不完整。");
|
||||||
|
}
|
||||||
|
// 判断入库单号是否重复
|
||||||
|
AppPmsOrderOut existAppPmsOrderOut = appPmsOrderOutService.selectAppPmsOrderOutByListId(orderOutRequest.getListId());
|
||||||
|
if (existAppPmsOrderOut != null) {
|
||||||
|
return error("出库单号重复。");
|
||||||
|
}
|
||||||
|
AppPmsOrderOut appPmsOrderOut = new AppPmsOrderOut();
|
||||||
|
appPmsOrderOut.setListId(orderOutRequest.getListId());
|
||||||
|
appPmsOrderOut.setOrderType(Long.valueOf(orderOutRequest.getOrderType()));
|
||||||
|
appPmsOrderOut.setCustomerId(orderOutRequest.getCustomerId());
|
||||||
|
appPmsOrderOut.setGoodsId(orderOutRequest.getGoodsId());
|
||||||
|
appPmsOrderOut.setGoodsNum(BigDecimal.valueOf(orderOutRequest.getGoodsNum()));
|
||||||
|
appPmsOrderOut.setGoodsDesc(orderOutRequest.getGoodsDesc());
|
||||||
|
appPmsOrderOut.setCreateTime(new Date());
|
||||||
|
appPmsOrderOut.setUpdateTime(new Date());
|
||||||
|
|
||||||
|
return toAjax(appPmsOrderOutService.insertAppPmsOrderOut(appPmsOrderOut));
|
||||||
|
|
||||||
|
|
||||||
return success();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,11 @@
|
||||||
<result property="stockNum" column="stock_num" />
|
<result property="stockNum" column="stock_num" />
|
||||||
<result property="opUser" column="op_user" />
|
<result property="opUser" column="op_user" />
|
||||||
<result property="preTask" column="pre_task" />
|
<result property="preTask" column="pre_task" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAppTaskBakVo">
|
<sql id="selectAppTaskBakVo">
|
||||||
select task_id, task_type, task_status, task_priority, vehicle_id, origin, destination, wcs_task_id, create_time, finish_time, goods_id, op_num, stock_num, op_user, pre_task from app_task_bak
|
select task_id, task_type, task_status, task_priority, vehicle_id, origin, destination, wcs_task_id, create_time, finish_time, goods_id, op_num, stock_num, op_user, pre_task, remark from app_task_bak
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAppTaskBakList" parameterType="AppTaskBak" resultMap="AppTaskBakResult">
|
<select id="selectAppTaskBakList" parameterType="AppTaskBak" resultMap="AppTaskBakResult">
|
||||||
|
|
@ -42,6 +43,7 @@
|
||||||
<if test="stockNum != null "> and stock_num = #{stockNum}</if>
|
<if test="stockNum != null "> and stock_num = #{stockNum}</if>
|
||||||
<if test="opUser != null and opUser != ''"> and op_user = #{opUser}</if>
|
<if test="opUser != null and opUser != ''"> and op_user = #{opUser}</if>
|
||||||
<if test="preTask != null and preTask != ''"> and pre_task = #{preTask}</if>
|
<if test="preTask != null and preTask != ''"> and pre_task = #{preTask}</if>
|
||||||
|
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -68,6 +70,7 @@
|
||||||
<if test="stockNum != null">stock_num,</if>
|
<if test="stockNum != null">stock_num,</if>
|
||||||
<if test="opUser != null">op_user,</if>
|
<if test="opUser != null">op_user,</if>
|
||||||
<if test="preTask != null">pre_task,</if>
|
<if test="preTask != null">pre_task,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="taskId != null">#{taskId},</if>
|
<if test="taskId != null">#{taskId},</if>
|
||||||
|
|
@ -85,6 +88,7 @@
|
||||||
<if test="stockNum != null">#{stockNum},</if>
|
<if test="stockNum != null">#{stockNum},</if>
|
||||||
<if test="opUser != null">#{opUser},</if>
|
<if test="opUser != null">#{opUser},</if>
|
||||||
<if test="preTask != null">#{preTask},</if>
|
<if test="preTask != null">#{preTask},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -105,6 +109,7 @@
|
||||||
<if test="stockNum != null">stock_num = #{stockNum},</if>
|
<if test="stockNum != null">stock_num = #{stockNum},</if>
|
||||||
<if test="opUser != null">op_user = #{opUser},</if>
|
<if test="opUser != null">op_user = #{opUser},</if>
|
||||||
<if test="preTask != null">pre_task = #{preTask},</if>
|
<if test="preTask != null">pre_task = #{preTask},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,11 @@
|
||||||
<result property="opUser" column="op_user" />
|
<result property="opUser" column="op_user" />
|
||||||
<result property="opUser" column="op_user" />
|
<result property="opUser" column="op_user" />
|
||||||
<result property="preTask" column="pre_task" />
|
<result property="preTask" column="pre_task" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAppTaskVo">
|
<sql id="selectAppTaskVo">
|
||||||
select task_id, task_type, task_status, task_priority, vehicle_id, origin, destination, wcs_task_id, create_time, finish_time, goods_id, op_num, stock_num, op_user, pre_task from app_task
|
select task_id, task_type, task_status, task_priority, vehicle_id, origin, destination, wcs_task_id, create_time, finish_time, goods_id, op_num, stock_num, op_user, pre_task, remark from app_task
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAppTaskList" parameterType="AppTask" resultMap="AppTaskResult">
|
<select id="selectAppTaskList" parameterType="AppTask" resultMap="AppTaskResult">
|
||||||
|
|
@ -43,6 +44,7 @@
|
||||||
<if test="stockNum != null "> and stock_num = #{stockNum}</if>
|
<if test="stockNum != null "> and stock_num = #{stockNum}</if>
|
||||||
<if test="opUser != null and opUser != ''"> and op_user = #{opUser}</if>
|
<if test="opUser != null and opUser != ''"> and op_user = #{opUser}</if>
|
||||||
<if test="preTask != null and preTask != ''"> and pre_task = #{preTask}</if>
|
<if test="preTask != null and preTask != ''"> and pre_task = #{preTask}</if>
|
||||||
|
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -69,6 +71,7 @@
|
||||||
<if test="stockNum != null">stock_num,</if>
|
<if test="stockNum != null">stock_num,</if>
|
||||||
<if test="opUser != null">op_user,</if>
|
<if test="opUser != null">op_user,</if>
|
||||||
<if test="preTask != null">pre_task,</if>
|
<if test="preTask != null">pre_task,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="taskId != null">#{taskId},</if>
|
<if test="taskId != null">#{taskId},</if>
|
||||||
|
|
@ -86,6 +89,7 @@
|
||||||
<if test="stockNum != null">#{stockNum},</if>
|
<if test="stockNum != null">#{stockNum},</if>
|
||||||
<if test="opUser != null">#{opUser},</if>
|
<if test="opUser != null">#{opUser},</if>
|
||||||
<if test="preTask != null">#{preTask},</if>
|
<if test="preTask != null">#{preTask},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -109,6 +113,7 @@
|
||||||
<if test="appTask.stockNum != null">stock_num,</if>
|
<if test="appTask.stockNum != null">stock_num,</if>
|
||||||
<if test="appTask.opUser != null">op_user,</if>
|
<if test="appTask.opUser != null">op_user,</if>
|
||||||
<if test="appTask.preTask != null">pre_task,</if>
|
<if test="appTask.preTask != null">pre_task,</if>
|
||||||
|
<if test="appTask.remark != null">remark,</if>
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
values
|
values
|
||||||
|
|
@ -129,6 +134,7 @@
|
||||||
<if test="appTask.stockNum != null">#{appTask.stockNum},</if>
|
<if test="appTask.stockNum != null">#{appTask.stockNum},</if>
|
||||||
<if test="appTask.opUser != null">#{appTask.opUser},</if>
|
<if test="appTask.opUser != null">#{appTask.opUser},</if>
|
||||||
<if test="appTask.preTask != null">#{appTask.preTask},</if>
|
<if test="appTask.preTask != null">#{appTask.preTask},</if>
|
||||||
|
<if test="appTask.remark != null">#{appTask.remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
@ -152,6 +158,7 @@
|
||||||
<if test="stockNum != null">stock_num = #{stockNum},</if>
|
<if test="stockNum != null">stock_num = #{stockNum},</if>
|
||||||
<if test="opUser != null">op_user = #{opUser},</if>
|
<if test="opUser != null">op_user = #{opUser},</if>
|
||||||
<if test="preTask != null">pre_task = #{preTask},</if>
|
<if test="preTask != null">pre_task = #{preTask},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -174,6 +181,7 @@
|
||||||
<if test="appTask.stockNum != null">stock_num = #{appTask.stockNum},</if>
|
<if test="appTask.stockNum != null">stock_num = #{appTask.stockNum},</if>
|
||||||
<if test="appTask.opUser != null">op_user = #{appTask.opUser},</if>
|
<if test="appTask.opUser != null">op_user = #{appTask.opUser},</if>
|
||||||
<if test="appTask.preTask != null">pre_task = #{appTask.preTask},</if>
|
<if test="appTask.preTask != null">pre_task = #{appTask.preTask},</if>
|
||||||
|
<if test="appTask.remark != null">remark = #{appTask.remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where task_id = #{appTask.taskId}
|
where task_id = #{appTask.taskId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user