From 34a728e6cbb1207475ab05b404ecbdf9918edd19 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 15 Mar 2024 09:28:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B9=B3=E6=BD=AD=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thrsys/ThrInvOrderController.java | 7 +- .../api/dao/thrsys/ThrInvOrderMapper.java | 14 +- .../service/thrsys/ThrInvOrderService.java | 3 +- .../thrsys/impl/ThrInvOrderServiceImpl.java | 9 +- .../mapper/thrsys/ThrInvOrderMapper.xml | 258 +----------------- 5 files changed, 15 insertions(+), 276 deletions(-) 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} - - SELECT *, cb.userName as createByName diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index f0dc43052..c7ddd52e0 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -856,3 +856,11 @@ SET `configId` = 23, `type` = '1', `isShow` = 1, `columnName` = 'auditRemark', ` `buttonRule` = '[{\"type\":\"text\",\"size\":\"small\",\"style\":\"\",\"name\":\"审核过程\",\"clickFuc\":\"showApprovalFlowDetail\"}]', `number` = NULL, `lineNumber` = NULL, `clickFuc` = NULL, `size` = NULL, `style` = NULL, `disabled` = NULL, `checkRules` = NULL, `inputType` = NULL, `disabledFuc` = NULL, `expression` = NULL, `dataFuc` = NULL, `isShowXx` = NULL WHERE `id` = 258; + + + +CALL Pro_Temp_ColumnWork('basic_sk_project', 'unit', + ' varchar(30) NULL DEFAULT NULL COMMENT ''单位'' AFTER `type`', 1); + +CALL Pro_Temp_ColumnWork('basic_sk_project', 'price', + ' varchar(30) NULL DEFAULT NULL COMMENT ''价格'' AFTER `type`', 1);