From 8c0baa72803cc4b4c661735bcfc87c6d172a0ead Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Thu, 7 Nov 2024 20:50:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=20=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gzgqj/SpringBootSecurityApplication.java | 4 +- .../plan/controller/PlanOutController.java | 90 ++++++++ .../gzgqj/business/plan/entity/PageInfo.java | 13 ++ .../plan/entity/ProAddInfoDetails.java | 46 ++++ .../business/plan/entity/ProDevSelect.java | 34 +++ .../business/plan/entity/ProNeedInfo.java | 72 ++++++ .../business/plan/entity/ProOutDetail.java | 30 +++ .../business/plan/entity/ProOutInfoVo.java | 47 ++++ .../business/plan/entity/ProPlanInfoVo.java | 57 +++++ .../business/plan/mapper/PlanOutMapper.java | 89 ++++++++ .../business/plan/service/PlanOutService.java | 41 ++++ .../plan/service/PlanOutServiceImpl.java | 216 ++++++++++++++++++ .../advice/DecryptAndVerifyAspect.java | 2 + .../resources/mappers/plan/PlanOutMapper.xml | 97 ++++++++ 14 files changed, 836 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/controller/PlanOutController.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/PageInfo.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/ProAddInfoDetails.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/ProDevSelect.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/ProNeedInfo.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutDetail.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutInfoVo.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/entity/ProPlanInfoVo.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/mapper/PlanOutMapper.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutService.java create mode 100644 src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutServiceImpl.java create mode 100644 src/main/resources/mappers/plan/PlanOutMapper.xml diff --git a/src/main/java/com/bonus/gzgqj/SpringBootSecurityApplication.java b/src/main/java/com/bonus/gzgqj/SpringBootSecurityApplication.java index 5d07476..32063b3 100644 --- a/src/main/java/com/bonus/gzgqj/SpringBootSecurityApplication.java +++ b/src/main/java/com/bonus/gzgqj/SpringBootSecurityApplication.java @@ -12,7 +12,7 @@ import org.springframework.scheduling.annotation.EnableAsync; /** * @author 黑子 */ -@MapperScan({"com.bonus.gzgqj.*.*.dao", "com.bonus.gzgqj.*.dao"}) +@MapperScan({"com.bonus.gzgqj.**.dao", "com.bonus.gzgqj.**.mapper"}) @SpringBootApplication(exclude={MongoAutoConfiguration.class}) @EnableAsync public class SpringBootSecurityApplication implements CommandLineRunner { @@ -20,7 +20,7 @@ public class SpringBootSecurityApplication implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(SpringBootSecurityApplication.class, args); - System.err.println("智能安全带实时监测启动成功!"); + System.err.println("贵州机具后台管理系统启动成功!"); } @Async diff --git a/src/main/java/com/bonus/gzgqj/business/plan/controller/PlanOutController.java b/src/main/java/com/bonus/gzgqj/business/plan/controller/PlanOutController.java new file mode 100644 index 0000000..7b57423 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/controller/PlanOutController.java @@ -0,0 +1,90 @@ +package com.bonus.gzgqj.business.plan.controller; + +import com.bonus.gzgqj.business.plan.entity.ProDevSelect; +import com.bonus.gzgqj.business.plan.entity.ProNeedInfo; +import com.bonus.gzgqj.business.plan.entity.ProPlanInfoVo; +import com.bonus.gzgqj.business.plan.service.PlanOutService; +import com.bonus.gzgqj.manager.annotation.DecryptAndVerify; +import com.bonus.gzgqj.manager.core.entity.EncryptedReq; +import com.bonus.gzgqj.manager.webResult.ServerResponse; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; + +/** + * 出库 控制层 + * + + + */ +@RestController +@RequestMapping("/backstage/planOut") +@Slf4j +public class PlanOutController { + + @Autowired + private PlanOutService service; + + /** + * 数据详情分页接口 + * @param dto + * @return + */ + @PostMapping("getProPlanPage") + @DecryptAndVerify(decryptedClass = ProPlanInfoVo.class) + public PageInfo getProPlanPage(EncryptedReq dto) { + PageHelper.startPage(dto.getData().getPageNum(),dto.getData().getPageSize()); + PageInfo pageInfo = service.getProPlanPage(dto.getData());; + return pageInfo; + } + + /** + * 发货查询接口 + * @param dto + * @return + */ + @PostMapping("getPorInfoDetail") + @DecryptAndVerify(decryptedClass = ProNeedInfo.class) + public PageInfo getPorInfoDetail(EncryptedReq dto) { + PageHelper.startPage(dto.getData().getPageNum(),dto.getData().getPageSize()); + PageInfo pageInfo = service.getPorInfoDetail(dto.getData());; + return pageInfo; + } + + + /** + * 查询下拉选 + * -一级+二级 + * @param dto + * @return + */ + @PostMapping("getProDevSelected") + @DecryptAndVerify(decryptedClass = ProDevSelect.class) + public ServerResponse getProDevSelected(EncryptedReq dto) { + return service.getProDevSelected(dto.getData()); + } + + + /** + * 发货接口 + * -一级+二级 + * @param + * @return + */ + @PostMapping("insertProOutPutInfo") + public ServerResponse insertProOutPutInfo(HttpServletRequest request, @RequestParam("file[]") MultipartFile[] files) { + return service.insertProOutPutInfo(request,files); + } + + + + +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/PageInfo.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/PageInfo.java new file mode 100644 index 0000000..6b2a782 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/PageInfo.java @@ -0,0 +1,13 @@ +package com.bonus.gzgqj.business.plan.entity; + + +import lombok.Data; + +@Data +public class PageInfo { + + + private Integer pageNum; + + private Integer pageSize; +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/ProAddInfoDetails.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProAddInfoDetails.java new file mode 100644 index 0000000..edbe92d --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProAddInfoDetails.java @@ -0,0 +1,46 @@ +package com.bonus.gzgqj.business.plan.entity; + +import lombok.Data; +import org.omg.CORBA.PRIVATE_MEMBER; + +@Data +public class ProAddInfoDetails { + /** + * 类型 + */ + private String type; + /** + * 名称 + */ + private String name; + + /** + * 型号 + */ + private String module; + /** + * 类型id + */ + private String moduleId; + /** + * 单位 + */ + private String unit; + /** + * 发货数量 + */ + private int fhNum; + /** + * 所需数量 + */ + private int needNum; + /** + * 类型 + */ + private String needType; + /** + * 备注 + */ + private String remark; + +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/ProDevSelect.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProDevSelect.java new file mode 100644 index 0000000..84b956e --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProDevSelect.java @@ -0,0 +1,34 @@ +package com.bonus.gzgqj.business.plan.entity; + +import lombok.Data; +import org.omg.CORBA.PRIVATE_MEMBER; + +@Data +public class ProDevSelect { + + private String id; + + private String name; + + private String pId; + + private String pName; + /** + * + */ + private String ppName; + /** + * 库存数量 + */ + private String num; + + /** + * 单位 + */ + private String unit; + + /** + * 单位 + */ + private String proId; +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/ProNeedInfo.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProNeedInfo.java new file mode 100644 index 0000000..4269808 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProNeedInfo.java @@ -0,0 +1,72 @@ +package com.bonus.gzgqj.business.plan.entity; + +import lombok.Data; + +/** + * 工程需要数据 + */ +@Data +public class ProNeedInfo extends PageInfo { + /** + * 主键 + */ + private String id; + /** + * 工程id + */ + private String proId; + /** + * 类型 + */ + private String type; + /** + * 名称 + */ + private String name; + /** + * 规格型号 + */ + private String module; + /** + * 规格id + */ + private String moduleId; + /** + * 需求类型 1计划 2新增 + */ + private String needType; + /** + * 单位 + */ + private String unit; + /** + * 需要数量 + */ + private int needNum; + /** + * 发货数量 + */ + private int fhNum; + /** + * 调整量 + */ + private int tzNum; + /** + * 备注 + */ + private String remarks; + /** + * 差额 + */ + private String diff; + + /** + * 备注 + */ + private String outId; + + /** + * 数据源 1 计划 2 新增 + */ + private String dataType; +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutDetail.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutDetail.java new file mode 100644 index 0000000..d372b6a --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutDetail.java @@ -0,0 +1,30 @@ +package com.bonus.gzgqj.business.plan.entity; + +import lombok.Data; + +/** + * + */ +@Data +public class ProOutDetail { + /** + * id + */ + private String id; + /** + * 发货数量 + */ + private int fhNum; + /** + * 挺住数量 + */ + private int tzNum; + /** + * 工程id + */ + private String proId; + /** + * 备注 + */ + private String remarks; +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutInfoVo.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutInfoVo.java new file mode 100644 index 0000000..751f5b6 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProOutInfoVo.java @@ -0,0 +1,47 @@ +package com.bonus.gzgqj.business.plan.entity; + +import lombok.Data; + +import java.util.List; + +/** + * 出货 实体类 + */ +@Data +public class ProOutInfoVo { + + + private String id; + /** + * 发货人 + */ + private String userName; + /** + * 发货时间 + */ + private String createDay; + /** + * 备注 + */ + private String remarks; + /** + * 工程id + */ + private String proId; + /** + * 出货集合 + */ + private List list; + /** + * 新增数据集合 + */ + private List addList; + + private String creater; + + private String createUser; + + + + +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/entity/ProPlanInfoVo.java b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProPlanInfoVo.java new file mode 100644 index 0000000..aacce1f --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/entity/ProPlanInfoVo.java @@ -0,0 +1,57 @@ +package com.bonus.gzgqj.business.plan.entity; + +import lombok.Data; + +@Data +public class ProPlanInfoVo extends PageInfo { + + /** + * 工程id + */ + private String proId; + + /** + * 计划 量 + */ + private int planNum; + /** + * 出库单量 + */ + private int recordNum; + + /** + * 需用数量 + */ + private int needNum; + /** + * 出库量 + */ + private int outNum; + + /** + * 出库量 + */ + private int tzNum; + /** + * 状态 + */ + private int status; + /** + * 最后发货时间 + */ + private String lastDay; + + /** + * 进度 + */ + private String progress; + /** + * 工程名称 + */ + private String proName; + + +} + + + diff --git a/src/main/java/com/bonus/gzgqj/business/plan/mapper/PlanOutMapper.java b/src/main/java/com/bonus/gzgqj/business/plan/mapper/PlanOutMapper.java new file mode 100644 index 0000000..0a109e3 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/mapper/PlanOutMapper.java @@ -0,0 +1,89 @@ +package com.bonus.gzgqj.business.plan.mapper; + +import com.bonus.gzgqj.business.plan.entity.*; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface PlanOutMapper { + + /** + * 分页查询 + * @param data + * @return + */ + List getProPlanPage(ProPlanInfoVo data); + + /** + * 分页查询工程 发货信息 + * @param data + * @return + */ + List getPorInfoDetail(ProNeedInfo data); + + /** + * 下拉选 + * @param data + * @return + */ + List getProDevSelected(ProDevSelect data); + + /** + * 二级下拉选 + * @param data + * @return + */ + List getDevChilderList(ProDevSelect data); + + /** + * 新增出库 记录 + * @param vo + * @return + */ + int insertProOutInfo(ProOutInfoVo vo); + + /** + * + * @param details + * @return + */ + ProNeedInfo getProNeedInfo(ProOutDetail details); + + /** + * 删除树 + * @param vo + */ + void deleteProOut(ProOutInfoVo vo); + + /** + * 插入 计划数据 + * @param data + */ + int insertProNeedDetails(ProNeedInfo data); + + /** + * 更新 工程 -计划-发货 + * @param data + */ + void updateNeedInfo(ProNeedInfo data); + + /** + * 插入工程-计划-发货-信息 + * @param insertObj + */ + void addNeedInfo(ProNeedInfo insertObj); + + /** + * 查询 工程统计 表 + * @param vo + * @return + */ + ProPlanInfoVo getProPlanInfo(ProOutInfoVo vo); + + /** + * 更新 工程-计划-统计数据 + * @param data + */ + void updatePriPlanInfo(ProPlanInfoVo data); +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutService.java b/src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutService.java new file mode 100644 index 0000000..691edb1 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutService.java @@ -0,0 +1,41 @@ +package com.bonus.gzgqj.business.plan.service; + +import com.bonus.gzgqj.business.plan.entity.ProDevSelect; +import com.bonus.gzgqj.business.plan.entity.ProNeedInfo; +import com.bonus.gzgqj.business.plan.entity.ProPlanInfoVo; +import com.bonus.gzgqj.manager.webResult.ServerResponse; +import com.github.pagehelper.PageInfo; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; + +public interface PlanOutService { + /** + * 分页查询工程分页接口 + * @param data + * @return + */ + PageInfo getProPlanPage(ProPlanInfoVo data); + + /** + * 分页查询工程发货信息 + * @param data + * @return + */ + PageInfo getPorInfoDetail(ProNeedInfo data); + + /** + * 查询工程下拉选 + * @param data + * @return + */ + ServerResponse getProDevSelected(ProDevSelect data); + + /** + * 出货接口 + * @param request + * @param files + * @return + */ + ServerResponse insertProOutPutInfo(HttpServletRequest request, MultipartFile[] files); +} diff --git a/src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutServiceImpl.java b/src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutServiceImpl.java new file mode 100644 index 0000000..e009259 --- /dev/null +++ b/src/main/java/com/bonus/gzgqj/business/plan/service/PlanOutServiceImpl.java @@ -0,0 +1,216 @@ +package com.bonus.gzgqj.business.plan.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.collection.ListUtil; +import com.alibaba.fastjson.JSON; +import com.bonus.gzgqj.business.plan.entity.*; +import com.bonus.gzgqj.business.plan.mapper.PlanOutMapper; +import com.bonus.gzgqj.manager.common.util.R; +import com.bonus.gzgqj.manager.common.util.SecurityUtils; +import com.bonus.gzgqj.manager.common.util.StringHelper; +import com.bonus.gzgqj.manager.common.util.StringUtils; +import com.bonus.gzgqj.manager.webResult.ServerResponse; +import com.github.pagehelper.PageInfo; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.omg.CORBA.INTERNAL; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import java.util.ArrayList; +import java.util.List; + +@Service +@Slf4j +public class PlanOutServiceImpl implements PlanOutService{ + + @Autowired + private PlanOutMapper mapper; + /** + * 查询工程需要的系那个 + * @param data + * @return + */ + @Override + public PageInfo getProPlanPage(ProPlanInfoVo data) { + List list = new ArrayList<>(); + try { + list = mapper.getProPlanPage(data); + } catch (Exception e) { + log.error(e.toString(),e); + } + PageInfo pageInfo = new PageInfo<>(list); + return pageInfo; + } + + /** + * 分页查询 工程 发货详情 + * @param data + * @return + */ + @Override + public PageInfo getPorInfoDetail(ProNeedInfo data) { + List list = new ArrayList<>(); + try { + list = mapper.getPorInfoDetail(data); + } catch (Exception e) { + log.error(e.toString(),e); + } + PageInfo pageInfo = new PageInfo<>(list); + return pageInfo; + } + + /** + * 拆线呢 工程设备下拉选 + * @param data + * @return + */ + @Override + public ServerResponse getProDevSelected(ProDevSelect data) { + List list = new ArrayList<>(); + try { + if(StringHelper.isEmpty(data.getPId())) { + list = mapper.getProDevSelected(data); + }else{ + list = mapper.getDevChilderList(data); + } + } catch (Exception e) { + log.error(e.toString(),e); + } + return ServerResponse.createSuccess(list); + } + + /** + * 出货接口开发 + * @param request + * @param files + * @return + */ + @Override + public ServerResponse insertProOutPutInfo(HttpServletRequest request, MultipartFile[] files) { + try { + String params=request.getParameter("params"); + //数据 转化 + ProOutInfoVo vo= JSON.parseObject(params,ProOutInfoVo.class); + if(StringHelper.isEmpty(vo.getUserName())){ + return ServerResponse.createErroe("请填写发货人"); + } + if(StringHelper.isEmpty(vo.getCreateDay())){ + return ServerResponse.createErroe("请填写发货时间"); + } + if(files==null || files.length<=0){ + return ServerResponse.createErroe("未上传出货单"); + } + List list=vo.getList(); + if(CollectionUtil.isEmpty(list)){ + return ServerResponse.createErroe("请填写出货数量"); + } + List addList=vo.getAddList(); + long userId= SecurityUtils.getUserId(); + String userName=SecurityUtils.getUsername(); + System.err.println("us===="+userId+"========="+userName); + //出库记录单存储 + vo.setCreater(userId+""); + int num=mapper.insertProOutInfo(vo); + if(num>0){ + //计算 本次全部发货数量及整改数量 最后同步到 工程 -计划-发货统计表中 + int allFhNum=0; + int allTzNum=0; + for (ProOutDetail details:list){ + allFhNum=allFhNum+details.getFhNum(); + allTzNum=allTzNum+details.getTzNum(); + //获取 计划数据 + ProNeedInfo data=mapper.getProNeedInfo(details); + if(data==null){ + mapper.deleteProOut(vo); + return ServerResponse.createErroe("未找到发货内容,发货失败"); + }else{ + ProNeedInfo insertObj=new ProNeedInfo(); + BeanUtils.copyProperties(insertObj,data); + insertObj.setOutId(vo.getId()); + insertObj.setDataType("1"); + insertObj.setFhNum(details.getFhNum()); + insertObj.setTzNum(details.getTzNum()); + insertObj.setRemarks(details.getRemarks()); + int num2=mapper.insertProNeedDetails(insertObj); + if(num2>=0){ + //更新 工程-计划-发货 清单表 + int fhNum=data.getFhNum(); + int tzNum=data.getFhNum(); + data.setRemarks(details.getRemarks()); + int fhNum2=details.getFhNum(); + int tzNum2=details.getFhNum(); + data.setFhNum(fhNum+fhNum2); + data.setTzNum(tzNum+tzNum2); + mapper.updateNeedInfo(data); + }else { + return ServerResponse.createErroe("发货失败"); + } + } + } + //是否有 新增 + if(StringUtils.isNotEmpty(addList)){ + //全部新增发货清单 + for (ProAddInfoDetails details:addList){ + allFhNum=allFhNum+details.getFhNum(); + ProNeedInfo insertObj=new ProNeedInfo(); + insertObj.setOutId(vo.getId()); + insertObj.setDataType("1"); + insertObj.setFhNum(details.getFhNum()); + insertObj.setTzNum(0); + insertObj.setType(details.getType()); + insertObj.setName(details.getName()); + insertObj.setModule(details.getModule()); + insertObj.setModuleId(details.getModuleId()); + insertObj.setUnit(details.getUnit()); + insertObj.setRemarks(details.getRemark()); + insertObj.setDataType("2"); + insertObj.setProId(vo.getProId()); + //添加 记录清单 + int num2=mapper.insertProNeedDetails(insertObj); + if(num2>=0){ + //新增 工程-计划-发货 清单表 + mapper.addNeedInfo(insertObj); + }else { + return ServerResponse.createErroe("发货失败"); + } + } + } + //更新工程 总数据信息 + ProPlanInfoVo data= mapper.getProPlanInfo(vo); + int recordNum=data.getRecordNum(); + int outNum= data.getOutNum(); + int needNum= data.getNeedNum(); + recordNum=recordNum+1; + outNum=outNum+allFhNum; + data.setRecordNum(recordNum); + //发货数量 + data.setOutNum(outNum); + //调整数量 + data.setTzNum(allTzNum); + //更新 发货状态 + if(needNum>outNum+allTzNum){ + data.setStatus(1); + }else { + data.setStatus(2); + } + data.setLastDay(vo.getCreateDay()); + //更新 工程-计划 -统计表 + mapper.updatePriPlanInfo(data); + + }else { + return ServerResponse.createErroe("发货失败"); + } + + + } catch (Exception e) { + log.error(e.toString(),e); + } + return ServerResponse.createSuccess(); + } +} diff --git a/src/main/java/com/bonus/gzgqj/manager/advice/DecryptAndVerifyAspect.java b/src/main/java/com/bonus/gzgqj/manager/advice/DecryptAndVerifyAspect.java index 6fec90e..8f90b10 100644 --- a/src/main/java/com/bonus/gzgqj/manager/advice/DecryptAndVerifyAspect.java +++ b/src/main/java/com/bonus/gzgqj/manager/advice/DecryptAndVerifyAspect.java @@ -36,6 +36,8 @@ public class DecryptAndVerifyAspect { if (encryptedReq == null) { // throw new DecryptAndVerifyException(joinPoint.getSignature().getName() + ",参数中无待解密类"); } + + String decryptedData = decryptAndVerify(encryptedReq); MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); DecryptAndVerify annotation = methodSignature.getMethod().getAnnotation(DecryptAndVerify.class); diff --git a/src/main/resources/mappers/plan/PlanOutMapper.xml b/src/main/resources/mappers/plan/PlanOutMapper.xml new file mode 100644 index 0000000..037c8d8 --- /dev/null +++ b/src/main/resources/mappers/plan/PlanOutMapper.xml @@ -0,0 +1,97 @@ + + + + + insert into t_plan_out( pro_id, consignor, shipment_date, remarks, create_time, create_day, creater + )VALUES (#{proId},#{userName},#{createDay},#{remarks},now(),CURRENT_DATE,#{creater}) + + + insert into t_plan_out_detail( + out_id, type, name, module, unit, module_id, fh_num, tz_num, remarks, data_type )values ( + #{outId},#{type},#{name},#{module},#{unit},#{moduleId},#{fhNum},#{tzNum},#{remarks},#{dataType} ) + + + insert into t_pro_need_info ( + pro_id, type, name, module, module_id, need_type, unit, need_num, fh_num, tz_num, remarks + ) values (#{proId},#{type},#{name},#{module},#{moduleId},#{needType},#{unit},#{needNum},#{fhNum},#{tzNum},#{remarks}) + + + update t_pro_need_info set fh_num=#{fhNum} ,tz_num=#{tzNum},remarks=#{remarks} + where id=#{id} + + + + update t_pro_plan_info set record_num=#{recordNum},out_num=#{outNum},tz_num=#{tzNum},last_day=#{lastDay}, + status=#{status} + where pro_id=#{proId} + + + delete from t_plan_out where id=#{id} + + + + + + + + + + + \ No newline at end of file