From 5035489ad4fb295071edcfb87be6cec4a1cb79ef Mon Sep 17 00:00:00 2001 From: "shunyi.kuang" <846002312@qq.com> Date: Mon, 26 Jan 2026 17:17:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=97=A5=E8=AE=A1=E5=88=92=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E5=AE=A2=E6=88=B7=E9=9C=80=E6=B1=82-=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dayPlan/controller/DemandController.java | 158 +------------- .../dayPlan/service/IDemandService.java | 12 +- .../service/impl/DemandServiceImpl.java | 200 +++++++++++++++--- 3 files changed, 183 insertions(+), 187 deletions(-) diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/controller/DemandController.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/controller/DemandController.java index 8fbc55a..de078a0 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/controller/DemandController.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/controller/DemandController.java @@ -20,36 +20,21 @@ import org.springframework.web.multipart.MultipartFile; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.support.ExcelTypeEnum; -import com.pictc.datalog.DataOperationContent; -import com.pictc.datalog.DataOperationListener; -import com.pictc.enums.BusinessCode; -import com.pictc.enums.ExceptionCommonCode; -import com.pictc.jdbc.JdbcTools; -import com.pictc.jdbc.model.JdbcParam; -import com.pictc.utils.DataLogTools; -import com.xjrsoft.common.exception.BusinessException; import com.xjrsoft.common.model.result.R; import com.xjrsoft.common.page.PageOutput; import com.xjrsoft.common.utils.ExcelUtil; -import com.xjrsoft.module.common.db.utils.CommonCallUtils; import com.xjrsoft.module.datalog.service.DatalogService; import com.xjrsoft.module.datalog.vo.DataChangeLogVo; import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto; import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto; -import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandPurDto; -import com.xjrsoft.module.dayPlan.entity.LngPngDemand; import com.xjrsoft.module.dayPlan.service.IDemandService; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo; -import com.xjrsoft.module.dayPlan.vo.LngPngDemandPurVo; -import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo; -import com.pictc.utils.StringUtils; + import cn.dev33.satoken.annotation.SaCheckPermission; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.util.IdUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; -import shade.powerjob.com.google.common.collect.Lists; /** * @title: 日计划-客户需求 @@ -65,6 +50,7 @@ public class DemandController { private final IDemandService demandService; + private final DatalogService dataService; @GetMapping(value = "/page") @@ -95,80 +81,15 @@ public class DemandController { @ApiOperation(value = "新增LngPngDemand") @SaCheckPermission("demand:add") public R add(@Valid @RequestBody UpdateLngPngDemandDto dto){ - if(dto.getId() == null) { - dto.setId(IdUtil.getSnowflakeNextId()); - dto.setOrgId(dto.getId()); - dto.setLastVerSign("Y"); - } - //dto.setTenantId(null); - return R.ok(dataService.insert(dto,new DataOperationListener() { - - @Override - public UpdateLngPngDemandDto before(DataOperationContent content) { - return null; - } - - @Override - public UpdateLngPngDemandDto after(DataOperationContent content) { - String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}", - content.getTableName()); - List params = Lists.newArrayList(); - JdbcParam outParam = JdbcParam.ofString(null).setOut(true); - params.add(outParam); - params.add(JdbcParam.ofLong(content.getIdValue())); - if(dto.getId() == null) { - params.add(JdbcParam.ofString("I")); - }else { - params.add(JdbcParam.ofString("U")); - } - - JdbcTools.call(sql,params); - String error = outParam.getStringValue(); - if (StringUtils.isNotEmpty(error)) { - throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error)); - } - return content.getObj(); - } - })); - + return R.ok(demandService.add(dto)); } @PutMapping @ApiOperation(value = "编辑LngPngDemand") @SaCheckPermission("demand:edit") public R update(@Valid @RequestBody UpdateLngPngDemandDto dto){ - LngPngDemand lngPngDemand = demandService.getByIdDeep(dto.getId()); - if (lngPngDemand == null) { - return R.error("找不到此数据!"); - } - if(!"WTJ".equals(lngPngDemand.getApproCode()) && !"YBH".equals(lngPngDemand.getApproCode())) { - throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能取消")); - } - dto.setOrgId(dto.getId()); - return R.ok(dataService.updateById(dto,new DataOperationListener() { - - @Override - public UpdateLngPngDemandDto before(DataOperationContent content) { - return null; - } - - @Override - public UpdateLngPngDemandDto after(DataOperationContent content) { - String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}", - content.getTableName()); - List params = Lists.newArrayList(); - JdbcParam outParam = JdbcParam.ofString(null).setOut(true); - params.add(outParam); - params.add(JdbcParam.ofLong(content.getIdValue())); - params.add(JdbcParam.ofString("U")); - JdbcTools.call(sql,params); - String error = outParam.getStringValue(); - if (StringUtils.isNotEmpty(error)) { - throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error)); - } - return content.getObj(); - } - })); + demandService.update(dto); + return R.ok(); } @PostMapping(value="/saveAndSubmit") @@ -183,77 +104,16 @@ public class DemandController { @ApiOperation(value = "变更LngPngDemand") //@SaCheckPermission("demand:toChange") public R toChange(@Valid @RequestParam Long id){ - LngPngDemandVo res = demandService.getInfoById(id); - if (res == null) { - return R.error("找不到此数据!"); - } - //LngPngDemandVo res = BeanUtil.toBean(lngPngDemand, LngPngDemandVo.class); - res.setId(null); - res.setVerNo((byte) (res.getVerNo()+(byte)1)); - res.setAlterSign("U"); - res.setApproCode("WTJ"); - res.setLastVerSign("Y"); - res.setTimeSubmit(null); - res.setReply(null); - res.setQtySalesGj(null); - res.setQtySalesM3(null); - res.setRateM3Gj(null); - res.setQtyContractGj(null); - res.setQtyContractM3(null); - res.setQtyPlanGj(null); - res.setQtyPlanM3(null); - res.setOrgId(id); - if(res.getLngPngDemandPurList() != null) { - for(LngPngDemandPurVo pdp: res.getLngPngDemandPurList()) { - pdp.setId(null); - pdp.setDemandId(null); - pdp.setQtySalesGj(null); - pdp.setQtySalesM3(null); - pdp.setAddSign("N"); - } - } - return R.ok(res); + + return R.ok(demandService.toChange(id)); } @GetMapping(value="/cancel") @ApiOperation(value = "取消LngPngDemand") //@SaCheckPermission("demand:cancel") public R cancel(@Valid @RequestParam Long id){ - LngPngDemand lngPngDemand = demandService.getByIdDeep(id); - if (lngPngDemand == null) { - return R.error("找不到此数据!"); - } - if(!"YSP".equals(lngPngDemand.getApproCode())) { - throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能取消")); - } - UpdateLngPngDemandDto temp = BeanUtil.toBean(lngPngDemand, UpdateLngPngDemandDto.class); - temp.setId(null); - temp.setAlterSign("D"); - temp.setApproCode("WTJ"); - temp.setTimeSubmit(null); - temp.setReply(null); - - if(temp.getLngPngDemandPurList() != null) { - for(UpdateLngPngDemandPurDto pdp: temp.getLngPngDemandPurList()) { - pdp.setId(null); - pdp.setDemandId(null); - pdp.setAddSign("N"); - } - } - return R.ok(dataService.insert(temp,new DataOperationListener() { - - @Override - public UpdateLngPngDemandDto before(DataOperationContent content) { - return null; - } - - @Override - public UpdateLngPngDemandDto after(DataOperationContent content) { - lngPngDemand.setLastVerSign("N"); - demandService.updateById(lngPngDemand); - return null; - } - })); + demandService.cancel(id); + return R.ok(); } diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/IDemandService.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/IDemandService.java index 9e287ae..3fcb59d 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/IDemandService.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/IDemandService.java @@ -7,13 +7,9 @@ import javax.validation.Valid; import com.github.yulichang.base.MPJBaseService; import com.github.yulichang.extension.mapping.base.MPJDeepService; import com.github.yulichang.extension.mapping.base.MPJRelationService; -import com.xjrsoft.common.model.result.R; -import com.xjrsoft.common.page.PageOutput; import com.xjrsoft.module.datalog.vo.CompareResultVo; -import com.xjrsoft.module.dayPlan.dto.LngPngDemandPageDto; import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto; import com.xjrsoft.module.dayPlan.entity.LngPngDemand; -import com.xjrsoft.module.dayPlan.vo.LngPngDemandPageVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo; /** @@ -40,6 +36,14 @@ public interface IDemandService extends MPJBaseService, MPJDeepSer void submit(@Valid List ids); void saveAndSubmit(@Valid UpdateLngPngDemandDto dto); + + UpdateLngPngDemandDto add(@Valid UpdateLngPngDemandDto dto); + + void update(@Valid UpdateLngPngDemandDto dto); + + void cancel(@Valid Long id); + + LngPngDemandVo toChange(@Valid Long id); } diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/impl/DemandServiceImpl.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/impl/DemandServiceImpl.java index fd0fb25..ffe2df3 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/impl/DemandServiceImpl.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/dayPlan/service/impl/DemandServiceImpl.java @@ -1,11 +1,6 @@ package com.xjrsoft.module.dayPlan.service.impl; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.time.LocalDate; import java.time.LocalDateTime; -import java.util.Collections; -import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -18,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.yulichang.base.MPJBaseServiceImpl; import com.pictc.datalog.DataOperationContent; import com.pictc.datalog.DataOperationListener; +import com.pictc.enums.ApproveCodeEnum; import com.pictc.enums.BusinessCode; import com.pictc.enums.ExceptionCommonCode; import com.pictc.jdbc.JdbcTools; @@ -26,20 +22,18 @@ import com.pictc.utils.DataLogTools; import com.pictc.utils.ObjectDiffUtils; import com.pictc.utils.StringUtils; import com.xjrsoft.common.exception.BusinessException; +import com.xjrsoft.common.model.result.R; import com.xjrsoft.module.datalog.service.DatalogService; import com.xjrsoft.module.datalog.vo.CompareResultVo; import com.xjrsoft.module.dayPlan.dto.UpdateLngPngApproDto; import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandDto; +import com.xjrsoft.module.dayPlan.dto.UpdateLngPngDemandPurDto; import com.xjrsoft.module.dayPlan.entity.LngPngAppro; import com.xjrsoft.module.dayPlan.entity.LngPngDemand; -import com.xjrsoft.module.dayPlan.entity.LngPngDemandPur; import com.xjrsoft.module.dayPlan.mapper.LngPngApproMapper; import com.xjrsoft.module.dayPlan.mapper.LngPngDemandMapper; import com.xjrsoft.module.dayPlan.mapper.LngPngDemandPurMapper; import com.xjrsoft.module.dayPlan.service.IDemandService; -import com.xjrsoft.module.dayPlan.vo.LngPngApproPurVo; -import com.xjrsoft.module.dayPlan.vo.LngPngApproVo; -import com.xjrsoft.module.dayPlan.vo.LngPngDemandChangeDetailVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandPurVo; import com.xjrsoft.module.dayPlan.vo.LngPngDemandVo; @@ -59,22 +53,17 @@ import shade.powerjob.com.google.common.collect.Lists; public class DemandServiceImpl extends MPJBaseServiceImpl implements IDemandService { private final LngPngApproMapper approMapper; - - private final LngPngDemandPurMapper demandPurMapper; private final LngPngDemandMapper demandMapper; private final DatalogService dataService; - - @Override public LngPngDemandVo getInfoById(Long id) { LngPngDemandVo lngPngDemandVo = this.baseMapper.getInfoBygId(id); if (lngPngDemandVo == null) { return null; } - List purList = demandMapper.queryLngPngDemandPurList(id); lngPngDemandVo.setLngPngDemandPurList(purList); return lngPngDemandVo; @@ -109,8 +98,6 @@ public class DemandServiceImpl extends MPJBaseServiceImpl ids) { @@ -127,7 +114,7 @@ public class DemandServiceImpl extends MPJBaseServiceImpl queryApproWrapper = new LambdaQueryWrapper<>(); @@ -144,7 +131,6 @@ public class DemandServiceImpl extends MPJBaseServiceImpl content) { - //DataLogTools.deleteByIds(UpdateLngPngApproDto.class,approIds); deleteAppro(approIds); return null; } @@ -161,7 +147,8 @@ public class DemandServiceImpl extends MPJBaseServiceImpl queryWrapper = new LambdaQueryWrapper<>(); @@ -171,8 +158,6 @@ public class DemandServiceImpl extends MPJBaseServiceImpl queryApproWrapper = new LambdaQueryWrapper<>(); queryApproWrapper.in(LngPngAppro::getDemandId, ids); @@ -196,18 +181,14 @@ public class DemandServiceImpl extends MPJBaseServiceImpl approIds){ - DataLogTools.deleteByIds(UpdateLngPngApproDto.class, approIds,new DataOperationListener() { - + DataLogTools.deleteByIds(UpdateLngPngApproDto.class, approIds, + new DataOperationListener() { @Override public UpdateLngPngApproDto before(DataOperationContent content) { return null; @@ -215,8 +196,6 @@ public class DemandServiceImpl extends MPJBaseServiceImpl content) { - - return null; } }); @@ -231,11 +210,12 @@ public class DemandServiceImpl extends MPJBaseServiceImpl() { @@ -338,5 +318,157 @@ public class DemandServiceImpl extends MPJBaseServiceImpl() { + + @Override + public UpdateLngPngDemandDto before(DataOperationContent content) { + return null; + } + + @Override + public UpdateLngPngDemandDto after(DataOperationContent content) { + String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}", + content.getTableName()); + List params = Lists.newArrayList(); + JdbcParam outParam = JdbcParam.ofString(null).setOut(true); + params.add(outParam); + params.add(JdbcParam.ofLong(content.getIdValue())); + if(dto.getId() == null) { + params.add(JdbcParam.ofString("I")); + }else { + params.add(JdbcParam.ofString("U")); + } + + JdbcTools.call(sql,params); + String error = outParam.getStringValue(); + if (StringUtils.isNotEmpty(error)) { + throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error)); + } + return content.getObj(); + } + }); + return dto; + } + + @Override + public void update(@Valid UpdateLngPngDemandDto dto) { + LngPngDemand lngPngDemand = this.getByIdDeep(dto.getId()); + if (lngPngDemand == null) { + throw new BusinessException(BusinessCode.of(10500,"找不到此数据!")); + } + if(!ApproveCodeEnum.WTJ.getCode().equals(lngPngDemand.getApproCode()) && !ApproveCodeEnum.YBH.getCode().equals(lngPngDemand.getApproCode())) { + throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能取消")); + } + if(dto.getId() != null && dto.getOrgId() == null) { + dto.setOrgId(dto.getId()); + } + + dataService.updateById(dto,new DataOperationListener() { + + @Override + public UpdateLngPngDemandDto before(DataOperationContent content) { + return null; + } + + @Override + public UpdateLngPngDemandDto after(DataOperationContent content) { + String sql = StringUtils.format("{? = call pc_{0}.f_save(?,?)}", + content.getTableName()); + List params = Lists.newArrayList(); + JdbcParam outParam = JdbcParam.ofString(null).setOut(true); + params.add(outParam); + params.add(JdbcParam.ofLong(content.getIdValue())); + params.add(JdbcParam.ofString("U")); + JdbcTools.call(sql,params); + String error = outParam.getStringValue(); + if (StringUtils.isNotEmpty(error)) { + throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_DELETE_EXEC_ERROR, error)); + } + return content.getObj(); + } + }); + } + + @Override + public void cancel(@Valid Long id) { + LngPngDemand lngPngDemand = this.getByIdDeep(id); + if (lngPngDemand == null) { + throw new BusinessException(BusinessCode.of(10500,"找不到此数据!")); + } + if(!ApproveCodeEnum.YSP.getCode().equals(lngPngDemand.getApproCode())) { + throw new BusinessException(BusinessCode.of(10500,"审批状态变化,不能取消")); + } + UpdateLngPngDemandDto temp = BeanUtil.toBean(lngPngDemand, UpdateLngPngDemandDto.class); + temp.setId(null); + temp.setAlterSign("D"); + temp.setApproCode(ApproveCodeEnum.WTJ.getCode()); + temp.setTimeSubmit(null); + temp.setReply(null); + + if(temp.getLngPngDemandPurList() != null) { + for(UpdateLngPngDemandPurDto pdp: temp.getLngPngDemandPurList()) { + pdp.setId(null); + pdp.setDemandId(null); + pdp.setAddSign("N"); + } + } + dataService.updateById(temp,new DataOperationListener() { + + @Override + public UpdateLngPngDemandDto before(DataOperationContent content) { + return null; + } + + @Override + public UpdateLngPngDemandDto after(DataOperationContent content) { + lngPngDemand.setLastVerSign("N"); + baseMapper.updateById(lngPngDemand); + return null; + } + }); + + } + + @Override + public LngPngDemandVo toChange(@Valid Long id) { + LngPngDemandVo res = this.getInfoById(id); + if (res == null) { + throw new BusinessException(BusinessCode.of(10500,"找不到此数据!")); + } + res.setId(null); + res.setVerNo((byte) (res.getVerNo()+(byte)1)); + res.setAlterSign("U"); + res.setApproCode(ApproveCodeEnum.WTJ.getCode()); + res.setLastVerSign("Y"); + res.setTimeSubmit(null); + res.setReply(null); + res.setQtySalesGj(null); + res.setQtySalesM3(null); + res.setRateM3Gj(null); + res.setQtyContractGj(null); + res.setQtyContractM3(null); + res.setQtyPlanGj(null); + res.setQtyPlanM3(null); + res.setOrgId(id); + if(res.getLngPngDemandPurList() != null) { + for(LngPngDemandPurVo pdp: res.getLngPngDemandPurList()) { + pdp.setId(null); + pdp.setDemandId(null); + pdp.setQtySalesGj(null); + pdp.setQtySalesM3(null); + pdp.setAddSign("N"); + } + } + return res; + } + } From 31904e4c3c28fd765ebbd03f428c72b325131fe0 Mon Sep 17 00:00:00 2001 From: "shunyi.kuang" <846002312@qq.com> Date: Mon, 26 Jan 2026 17:24:42 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=97=A5=E8=AE=A1=E5=88=92=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E5=AE=A2=E6=88=B7=E9=9C=80=E6=B1=82-=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/pictc/enums/ApproveCodeEnum.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 itc-pcitc-dependencies/itc-pcitc-dependencies-api/src/main/java/com/pictc/enums/ApproveCodeEnum.java diff --git a/itc-pcitc-dependencies/itc-pcitc-dependencies-api/src/main/java/com/pictc/enums/ApproveCodeEnum.java b/itc-pcitc-dependencies/itc-pcitc-dependencies-api/src/main/java/com/pictc/enums/ApproveCodeEnum.java new file mode 100644 index 0000000..2a91f99 --- /dev/null +++ b/itc-pcitc-dependencies/itc-pcitc-dependencies-api/src/main/java/com/pictc/enums/ApproveCodeEnum.java @@ -0,0 +1,32 @@ +package com.pictc.enums; + +/** + * @Author: zbz + * @Date: 2023/3/1 15:12 + */ +public enum ApproveCodeEnum { + + WTJ("WTJ", "未提交"), + + SPZ("SPZ", "审批中"), + + YSP("YSP", "已审批"), + + YBH("YBH", "已驳回"); + + final String code; + final String value; + + public String getCode() { + return this.code; + } + + public String getValue() { + return this.value; + } + + ApproveCodeEnum(final String code, final String message) { + this.code = code; + this.value = message; + } +} From 317b0020e3fe17a5135dfce3c30e30e1611e7722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A7=89=E5=8D=93?= Date: Tue, 27 Jan 2026 16:34:08 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/contract/vo/LngContractPageVo.java | 13 +++++++------ .../contract/controller/ContractFactController.java | 4 +--- .../module/contract/mapper/LngContractMapper.java | 2 +- .../module/sales/controller/ApproController.java | 4 +--- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java b/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java index 1312c25..6d169cc 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java @@ -1,6 +1,7 @@ package com.xjrsoft.module.contract.vo; import com.fasterxml.jackson.annotation.JsonFormat; +import com.xjrsoft.common.model.base.BaseModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -13,7 +14,7 @@ import java.time.LocalDateTime; * @Version 1.0 */ @Data -public class LngContractPageVo { +public class LngContractPageVo extends BaseModel { /** * 主键 @@ -82,11 +83,11 @@ public class LngContractPageVo { */ @ApiModelProperty("备注") private String note; - /** - * 数据权限id - */ - @ApiModelProperty("数据权限id") - private Long ruleUserId; +// /** +// * 数据权限id +// */ +// @ApiModelProperty("数据权限id") +// private Long ruleUserId; /** * 交割点名称 */ diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/controller/ContractFactController.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/controller/ContractFactController.java index 843ef21..8ef1cdb 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/controller/ContractFactController.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/controller/ContractFactController.java @@ -16,7 +16,6 @@ import com.xjrsoft.common.exception.BusinessException; import com.xjrsoft.common.model.result.R; import com.xjrsoft.common.page.ConventPage; import com.xjrsoft.common.page.PageOutput; -import com.xjrsoft.common.utils.VoToColumnUtil; import com.xjrsoft.module.contract.dto.LngContractFactPageDto; import com.xjrsoft.module.contract.dto.UpdateLngContractFactDto; import com.xjrsoft.module.contract.entity.LngContractFact; @@ -65,8 +64,7 @@ public class ContractFactController { .like(LngContractFact::getKName, dto.getKName()) ) .eq(StrUtil.isNotBlank(dto.getRelTypeCode()), LngContractFact::getRelTypeCode,dto.getRelTypeCode()) - .orderByDesc(LngContractFact::getDateDraft, LngContractFact::getKNo) - .select(LngContractFact.class,x -> VoToColumnUtil.fieldsToColumns(LngContractFactPageVo.class).contains(x.getProperty())); + .orderByDesc(LngContractFact::getDateDraft, LngContractFact::getKNo); IPage page = contractFactService.page(ConventPage.getPage(dto), queryWrapper); PageOutput pageOutput = ConventPage.getPageOutput(page, LngContractFactPageVo.class); List list = pageOutput.list; diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractMapper.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractMapper.java index c86eb0a..70f1901 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractMapper.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractMapper.java @@ -27,7 +27,7 @@ public interface LngContractMapper extends MPJBaseMapper, BaseMappe @Select("SELECT k.id, k.rule_user_id, k.k_no, k.k_name, cu.cu_sname AS cp_name, k.date_from," + " k.date_to, GROUP_CONCAT(DISTINCT p.full_name) AS point_up_name," + " GROUP_CONCAT(DISTINCT di_trans.name) AS trans_name, com.name as com_name," + - " k.appro_code, dd_a.name as appro_name, k.note" + + " k.appro_code, dd_a.name as appro_name, k.note, k.create_user_id" + " FROM lng_contract k" + " JOIN lng_contract_sales_png_point kppp ON kppp.k_id=k.id" + " LEFT JOIN lng_customer cu on cu.cu_code=k.cp_code" + diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/sales/controller/ApproController.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/sales/controller/ApproController.java index 9f13955..186ad8e 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/sales/controller/ApproController.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/sales/controller/ApproController.java @@ -17,7 +17,6 @@ import com.xjrsoft.common.exception.BusinessException; import com.xjrsoft.common.model.result.R; import com.xjrsoft.common.page.ConventPage; import com.xjrsoft.common.page.PageOutput; -import com.xjrsoft.common.utils.VoToColumnUtil; import com.xjrsoft.module.datalog.service.DatalogService; import com.xjrsoft.module.datalog.vo.DataChangeLogVo; import com.xjrsoft.module.sales.dto.LngApproPageDto; @@ -69,8 +68,7 @@ public class ApproController { ) .eq(StrUtil.isNotBlank(dto.getTypeCode()),LngAppro::getTypeCode,dto.getTypeCode()) .eq(StrUtil.isNotBlank(dto.getApproCode()),LngAppro::getApproCode,dto.getApproCode()) - .orderByDesc(LngAppro::getId) - .select(LngAppro.class,x -> VoToColumnUtil.fieldsToColumns(LngApproPageVo.class).contains(x.getProperty())); + .orderByDesc(LngAppro::getId); IPage page = approService.page(ConventPage.getPage(dto), queryWrapper); PageOutput pageOutput = ConventPage.getPageOutput(page, LngApproPageVo.class); List list = pageOutput.list; From 62e913420988069f57631423269a9004e4f7eb3e Mon Sep 17 00:00:00 2001 From: "shunyi.kuang" <846002312@qq.com> Date: Tue, 27 Jan 2026 17:31:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0createUserId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xjrsoft/module/contract/vo/LngContractPageVo.java | 2 ++ .../main/java/com/xjrsoft/module/sales/vo/LngScorePageVo.java | 2 ++ .../xjrsoft/module/contract/mapper/LngContractPurMapper.java | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java b/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java index 1312c25..9c81199 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/contract/vo/LngContractPageVo.java @@ -97,4 +97,6 @@ public class LngContractPageVo { */ @ApiModelProperty("自主托运") private String transName; + + private Long createUserId; } diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/sales/vo/LngScorePageVo.java b/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/sales/vo/LngScorePageVo.java index bb65bf5..183ff1b 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/sales/vo/LngScorePageVo.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-api/src/main/java/com/xjrsoft/module/sales/vo/LngScorePageVo.java @@ -74,5 +74,7 @@ public class LngScorePageVo { */ @ApiModelProperty("备注") private String note; + + private Long createUserId; } diff --git a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractPurMapper.java b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractPurMapper.java index 369fcec..5d3a928 100644 --- a/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractPurMapper.java +++ b/itc-pcitc-mdm/itc-pcitc-mdm-service/src/main/java/com/xjrsoft/module/contract/mapper/LngContractPurMapper.java @@ -23,7 +23,7 @@ import com.xjrsoft.module.contract.vo.LngContractPageVo; public interface LngContractPurMapper extends MPJBaseMapper, BaseMapper { - @Select("SELECT k.id, k.rule_user_id, k.k_no, k.k_name, su.su_sname AS cp_name, k.date_from," + + @Select("SELECT k.id, k.rule_user_id, k.k_no, k.k_name,k.create_user_id, su.su_sname AS cp_name, k.date_from," + " k.date_to, GROUP_CONCAT(DISTINCT p.full_name) AS point_up_name," + " GROUP_CONCAT(DISTINCT di_trans.name) AS trans_name, com.name as com_name," + " k.appro_code, dd_a.name as appro_name, k.note" +