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/entity/basic/BasicSkProjectEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicSkProjectEntity.java index 166c7fc40..ce08c7e1d 100644 --- a/src/main/java/com/glxp/api/entity/basic/BasicSkProjectEntity.java +++ b/src/main/java/com/glxp/api/entity/basic/BasicSkProjectEntity.java @@ -90,4 +90,10 @@ public class BasicSkProjectEntity { @TableField(value = "type") @ApiModelProperty(value = "类型:1:定数包,内部使用;2:项目、组套外部关联") private Integer type; + + + @TableField(value = "unit") + private String unit; + @TableField(value = "price") + private String price; } diff --git a/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java b/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java index 6532cd24e..2055c7b3a 100644 --- a/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java +++ b/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java @@ -2,6 +2,7 @@ package com.glxp.api.res.basic; import lombok.Data; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -41,6 +42,8 @@ public class BasicSkProjectResponse { */ private String remark; + private BigDecimal price; + private Date createTime; private String createUser; @@ -56,5 +59,8 @@ public class BasicSkProjectResponse { private Integer type; + private String unit; + private String price; + private List basicSkProjectDetailResponses; } 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/basic/BasicSkProjectMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicSkProjectMapper.xml index bb510ea5e..2ed66d0fc 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicSkProjectMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicSkProjectMapper.xml @@ -1,28 +1,6 @@ - - - - - - - - - - - - - - - - - - - id, idCode, code, `name`, category, ggxh, remark, createTime, `createUser`, updateTime, - updateUser - - - - select - - from thr_inv_order - where id = #{id,jdbcType=INTEGER} - - - - 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} - -