diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrInvOrderController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrInvOrderController.java index 65c69b461..64b3e2a11 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrInvOrderController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrInvOrderController.java @@ -9,6 +9,7 @@ import com.glxp.api.entity.thrsys.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.*; import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.thrsys.ThrInvOrderResponse; import com.glxp.api.service.thrsys.ThrInvOrderDetailService; import com.glxp.api.service.thrsys.ThrInvOrderService; import org.springframework.validation.BindingResult; @@ -38,11 +39,11 @@ public class ThrInvOrderController { if (bindingResult.hasErrors()) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } - List thrInvOrders + List thrInvOrders = thrInvOrderService.filterThrInvOrder(filterThrInvOrderRequest); - PageInfo pageInfo; + PageInfo pageInfo; pageInfo = new PageInfo<>(thrInvOrders); - PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setList(thrInvOrders); return ResultVOUtils.success(pageSimpleResponse); diff --git a/src/main/java/com/glxp/api/dao/thrsys/ThrInvOrderMapper.java b/src/main/java/com/glxp/api/dao/thrsys/ThrInvOrderMapper.java index 8036a0ac1..8f60dcf0d 100644 --- a/src/main/java/com/glxp/api/dao/thrsys/ThrInvOrderMapper.java +++ b/src/main/java/com/glxp/api/dao/thrsys/ThrInvOrderMapper.java @@ -4,23 +4,13 @@ import com.glxp.api.dao.BaseMapperPlus; import com.glxp.api.entity.thrsys.ThrInvOrder; import com.glxp.api.entity.thrsys.ThrInvOrderDetail; import com.glxp.api.req.thrsys.FilterThrInvOrderRequest; +import com.glxp.api.res.thrsys.ThrInvOrderResponse; import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper public interface ThrInvOrderMapper extends BaseMapperPlus { - int deleteByPrimaryKey(Integer id); - int insert(ThrInvOrder record); - - int insertSelective(ThrInvOrder record); - - ThrInvOrder selectByPrimaryKey(Integer id); - - int updateByPrimaryKeySelective(ThrInvOrder record); - - int updateByPrimaryKey(ThrInvOrder record); - - List filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest); + List filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest); } diff --git a/src/main/java/com/glxp/api/service/thrsys/ThrInvOrderService.java b/src/main/java/com/glxp/api/service/thrsys/ThrInvOrderService.java index 4e5f12864..70ba6eafe 100644 --- a/src/main/java/com/glxp/api/service/thrsys/ThrInvOrderService.java +++ b/src/main/java/com/glxp/api/service/thrsys/ThrInvOrderService.java @@ -8,6 +8,7 @@ import com.glxp.api.req.thrsys.FilterDownloadInvOrderRequest; import com.glxp.api.req.thrsys.FilterThrInvOrderRequest; import com.glxp.api.req.thrsys.GenerateOrderRequest; import com.glxp.api.req.thrsys.RefreshOrderRequest; +import com.glxp.api.res.thrsys.ThrInvOrderResponse; import java.util.List; @@ -40,7 +41,7 @@ public interface ThrInvOrderService { * @param filterThrInvOrderRequest * @return */ - List filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest); + List filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest); int delThrInvOrderByBillNo(String billNo); diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java index b4200b311..a015f2c52 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java @@ -32,6 +32,7 @@ import com.glxp.api.req.thrsys.RefreshOrderRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.MainIdRelIdAndProductResponse; import com.glxp.api.res.inv.ThrInvResultResponse; +import com.glxp.api.res.thrsys.ThrInvOrderResponse; import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.service.basic.ProductInfoService; @@ -324,7 +325,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { } @Override - public List filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest) { + public List filterThrInvOrder(FilterThrInvOrderRequest filterThrInvOrderRequest) { if (filterThrInvOrderRequest == null) { return Collections.emptyList(); } @@ -332,7 +333,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { int offset = (filterThrInvOrderRequest.getPage() - 1) * filterThrInvOrderRequest.getLimit(); PageHelper.offsetPage(offset, filterThrInvOrderRequest.getLimit()); } - List data = thrInvOrderMapper.filterThrInvOrder(filterThrInvOrderRequest); + List data = thrInvOrderMapper.filterThrInvOrder(filterThrInvOrderRequest); return data; } @@ -415,7 +416,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { thrInvOrder.setStatus(ConstantStatus.SFIO_CFMD);//已确认 thrInvOrder.setUpdateTime(new Date()); thrInvOrder.setUpdateUser(userId + ""); - thrInvOrderMapper.updateByPrimaryKey(thrInvOrder); + thrInvOrderMapper.updateById(thrInvOrder); ioOrderDetailBizService.batchInsertBizs(newOrderDetailBiz); //自动处理业务单据 @@ -499,7 +500,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { thrInvOrder.setStatus(ConstantStatus.SFIO_CFMD);//已确认 thrInvOrder.setUpdateTime(new Date()); thrInvOrder.setUpdateUser(userId + ""); - thrInvOrderMapper.updateByPrimaryKey(thrInvOrder); + thrInvOrderMapper.updateById(thrInvOrder); ioCodeTempDao.insertBatch(newIoCodeTemps); for (IoCodeTempEntity codeTempEntity : newIoCodeTemps) { addInoutService.genOrderDetailCode(ioOrderEntity, codeTempEntity); diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrInvOrderMapper.xml b/src/main/resources/mybatis/mapper/thrsys/ThrInvOrderMapper.xml index c03541397..a1d131af6 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrInvOrderMapper.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrInvOrderMapper.xml @@ -1,266 +1,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - id, billNo, billDate, startDate, endDate, mainAction, billType,thirdSysFk, deptCode, invCode, - spaceCode, `status`, createTime, `createUser`, updateTime, updateUser, remark,sourceType,exMsg,skProject - - - - - delete - from thr_inv_order - where id = #{id,jdbcType=INTEGER} - - - - insert into thr_inv_order - - - billNo, - - - billDate, - - - startDate, - - - endDate, - - - mainAction, - - - billType, - - - thirdSysFk, - - - deptCode, - - - invCode, - - - spaceCode, - - - `status`, - - - createTime, - - - `createUser`, - - - updateTime, - - - updateUser, - - - remark, - - - sourceType, - - - exMsg, - - - skProject, - - - - - #{billNo,jdbcType=VARCHAR}, - - - #{billDate,jdbcType=TIMESTAMP}, - - - #{startDate,jdbcType=TIMESTAMP}, - - - #{endDate,jdbcType=TIMESTAMP}, - - - #{mainAction,jdbcType=VARCHAR}, - - - #{billType,jdbcType=VARCHAR}, - - - #{thirdSysFk,jdbcType=VARCHAR}, - - - #{deptCode,jdbcType=VARCHAR}, - - - #{invCode,jdbcType=VARCHAR}, - - - #{spaceCode,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{createUser,jdbcType=VARCHAR}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - #{updateUser,jdbcType=VARCHAR}, - - - #{remark,jdbcType=VARCHAR}, - - - #{sourceType,jdbcType=INTEGER}, - - - #{exMsg,jdbcType=VARCHAR}, - - - #{skProject,jdbcType=INTEGER}, - - - - - - update thr_inv_order - - - billNo = #{billNo,jdbcType=VARCHAR}, - - - billDate = #{billDate,jdbcType=TIMESTAMP}, - - - startDate = #{startDate,jdbcType=TIMESTAMP}, - - - endDate = #{endDate,jdbcType=TIMESTAMP}, - - - mainAction = #{mainAction,jdbcType=VARCHAR}, - - - billType = #{billType,jdbcType=VARCHAR}, - - - thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR}, - - - deptCode = #{deptCode,jdbcType=VARCHAR}, - - - invCode = #{invCode,jdbcType=VARCHAR}, - - - spaceCode = #{spaceCode,jdbcType=VARCHAR}, - - - `status` = #{status,jdbcType=TINYINT}, - - - createTime = #{createTime,jdbcType=TIMESTAMP}, - - - `createUser` = #{createUser,jdbcType=VARCHAR}, - - - updateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - updateUser = #{updateUser,jdbcType=VARCHAR}, - - - remark = #{remark,jdbcType=VARCHAR}, - - - sourceType = #{sourceType,jdbcType=INTEGER}, - - - exMsg = #{exMsg,jdbcType=VARCHAR}, - - - skProject = #{skProject,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - - update thr_inv_order - set billNo = #{billNo,jdbcType=VARCHAR}, - billDate = #{billDate,jdbcType=TIMESTAMP}, - startDate = #{startDate,jdbcType=TIMESTAMP}, - endDate = #{endDate,jdbcType=TIMESTAMP}, - mainAction = #{mainAction,jdbcType=VARCHAR}, - billType = #{billType,jdbcType=VARCHAR}, - thirdSysFk = #{thirdSysFk,jdbcType=VARCHAR}, - deptCode = #{deptCode,jdbcType=VARCHAR}, - invCode = #{invCode,jdbcType=VARCHAR}, - spaceCode = #{spaceCode,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=TINYINT}, - createTime = #{createTime,jdbcType=TIMESTAMP}, - `createUser` = #{createUser,jdbcType=VARCHAR}, - updateTime = #{updateTime,jdbcType=TIMESTAMP}, - updateUser = #{updateUser,jdbcType=VARCHAR}, - remark = #{remark,jdbcType=VARCHAR}, - sourceType = #{sourceType,jdbcType=INTEGER}, - exMsg = #{exMsg,jdbcType=VARCHAR}, - skProject = #{skProject,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - -