From b6ed548e328aeb7fbc64824448109875a236fba4 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 10 Jul 2025 17:26:23 +0800 Subject: [PATCH] =?UTF-8?q?2025-07-10=201=E3=80=81=E5=8D=B0=E5=89=8D?= =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E6=A8=A1=E7=89=88=E8=B0=83=E6=95=B4=20=20=20?= =?UTF-8?q?=20=20=201=E3=80=81=E5=8F=96=E6=B6=88=E7=8E=B0=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B9=E5=BC=8F=20=20=20=20=20=20=20=20=20=201.1=20?= =?UTF-8?q?=20=20=E5=88=97=E8=A1=A8=E5=AD=97=E6=AE=B5=EF=BC=9A=E7=9C=8B?= =?UTF-8?q?=E5=9B=BE=EF=BC=88=E9=9C=80=E8=A6=81=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=EF=BC=89=20=20=20=20=20=202=E3=80=81=E5=B8=A6=E5=87=BA?= =?UTF-8?q?=E8=AF=A5=E7=89=A9=E6=96=99=E5=AF=B9=E5=BA=94=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E3=80=81=E6=9B=BF=E4=BB=A3=E7=9A=84=E5=88=80=E5=85=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=20=20=20=20=20=20=20=20=20=202.1=20=20=20=E6=A0=B9?= =?UTF-8?q?=E6=8D=AERouting=E4=B8=AD=E7=9A=84=E5=B7=A5=E8=89=BA=E6=8C=87?= =?UTF-8?q?=E5=AF=BC=E7=9A=84=E7=B1=BB=E5=9E=8B=E6=98=AFPlate=20No.?= =?UTF-8?q?=E5=B8=A6=E5=88=B0=E5=8D=B0=E7=89=88=E7=BC=96=E5=8F=B7/PlateNo?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=202.2=20=20=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E7=89=88=E6=9C=AC+=E6=9B=BF=E4=BB=A3=E5=B8=A6=E5=87=BARouting?= =?UTF-8?q?=20Tools=E7=9A=84=E5=B7=A5=E5=85=B7=E7=BC=96=E7=A0=81=E3=80=81?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=90=8D=E7=A7=B0=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=202.3=20=20=20=E6=A0=B9=E6=8D=AE=E8=AF=A5=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=BC=96=E7=A0=81=E4=B8=BA"Number=20across?= =?UTF-8?q?=E3=80=81Number=20down"=E7=9A=84=E5=B1=9E=E6=80=A7=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TechnicalSpecificationController.java | 68 +++++++- .../dao/TechnicalSpecificationMapper.java | 22 +++ .../data/PlmBmPrepressData.java | 4 + .../entity/PlmBmPrepressTool.java | 65 ++++++++ .../TechnicalSpecificationServiceImpl.java | 146 +++++++++++++++-- .../TechnicalSpecificationService.java | 14 +- .../TechnicalSpecificationMapper.xml | 154 ++++++++++++++---- 7 files changed, 418 insertions(+), 55 deletions(-) create mode 100644 src/main/java/com/spring/modules/sampleManagement/entity/PlmBmPrepressTool.java diff --git a/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java b/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java index ba0649d7..15d4a8f6 100644 --- a/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java +++ b/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java @@ -8,6 +8,7 @@ import com.spring.common.utils.R; import com.spring.modules.base.data.PlmBmModelHeaderData; import com.spring.modules.base.data.PlmBmPropertiesValueData; import com.spring.modules.change.vo.ChangeRequestVo; +import com.spring.modules.part.entity.BomAllFieldEntity; import com.spring.modules.part.entity.BomDetailEntity; import com.spring.modules.part.entity.RoutingDetailEntity; import com.spring.modules.part.vo.*; @@ -19,6 +20,7 @@ import com.spring.modules.quotation.vo.QuotationDetailVo; import com.spring.modules.sampleManagement.dao.UpBMRevNoData; import com.spring.modules.sampleManagement.data.*; import com.spring.modules.sampleManagement.entity.NodeVo; +import com.spring.modules.sampleManagement.entity.PlmBmPrepressTool; import com.spring.modules.sampleManagement.service.TechnicalSpecificationService; import com.spring.modules.sampleManagement.service.TechnicalSpecificationSheetService; import com.spring.modules.sift.utils.QueryCriteriaConstructorDefault; @@ -569,9 +571,9 @@ public class TechnicalSpecificationController { */ @PostMapping(value="/searchBMPrepressDetail") @ResponseBody - public R searchBMPrepressDetail(@RequestBody PlmBmPrepressData data){ - List rows= technicalSpecificationService.searchBMPrepressDetail(data); - return R.ok().put("rows", rows); + public R searchBMPrepressDetail(@RequestBody PlmBmPrepressData data) { + PlmBmPrepressData row = technicalSpecificationService.searchBMPrepressDetail(data); + return R.ok().put("rows", row); } /** @@ -685,7 +687,7 @@ public class TechnicalSpecificationController { /** * @Description 修改BM模板信息 * @Title - * @param null + * @param * @author rq * @date 2023/12/19 16:35 * @return null @@ -1358,4 +1360,62 @@ public class TechnicalSpecificationController { PageUtils page = technicalSpecificationService.urlFileSearch(data); return R.ok().put("page", page); } + + /** + * 新增工具 + * @param data + * @return + */ + @PostMapping(value="/saveBMPrepressTool") + @ResponseBody + public R saveBMPrepressTool(@RequestBody PlmBmPrepressTool data){ + technicalSpecificationService.saveBMPrepressTool(data); + return R.ok(); + } + + /** + * 获取序号 + * @param data + * @return + */ + @PostMapping(value="/getBMToolSeqNo") + @ResponseBody + public R getBMToolSeqNo(@RequestBody PlmBmPrepressTool data) { + Integer seqNo = technicalSpecificationService.getBMToolSeqNo(data); + return R.ok().put("seqNo", seqNo); + } + + /** + * 编辑工具 + * @param data + * @return + */ + @PostMapping(value="/updateBMPrepressTool") + @ResponseBody + public R updateBMPrepressTool(@RequestBody PlmBmPrepressTool data){ + technicalSpecificationService.updateBMPrepressTool(data); + return R.ok(); + } + + /** + * 删除工具 + * @param data + * @return + */ + @PostMapping(value="/deleteBMPrepressTool") + @ResponseBody + public R deleteBMPrepressTool(@RequestBody PlmBmPrepressTool data){ + technicalSpecificationService.deleteBMPrepressTool(data); + return R.ok(); + } + + /** + * 一键导入 + */ + @PostMapping(value="/saveBMToolBatch") + @ResponseBody + public R saveBMToolBatch(@RequestBody PlmBmPrepressTool data){ + technicalSpecificationService.saveBMToolBatch(data); + return R.ok(); + } } diff --git a/src/main/java/com/spring/modules/sampleManagement/dao/TechnicalSpecificationMapper.java b/src/main/java/com/spring/modules/sampleManagement/dao/TechnicalSpecificationMapper.java index 174a76ad..75809a11 100644 --- a/src/main/java/com/spring/modules/sampleManagement/dao/TechnicalSpecificationMapper.java +++ b/src/main/java/com/spring/modules/sampleManagement/dao/TechnicalSpecificationMapper.java @@ -18,6 +18,7 @@ import com.spring.modules.quotation.entity.QuotationHeader; import com.spring.modules.quotation.vo.QuotationDetailVo; import com.spring.modules.sampleManagement.data.*; import com.spring.modules.sampleManagement.entity.NodeVo; +import com.spring.modules.sampleManagement.entity.PlmBmPrepressTool; import com.spring.modules.sampleManagement.entity.PlmTechnicalSpecificationSheet; import com.spring.modules.sys.entity.DictData; import com.spring.modules.sys.entity.dto.DictDto; @@ -1215,4 +1216,25 @@ public interface TechnicalSpecificationMapper { IPage technicalSpecificationListSearchInPane(Page plmTechnicalSpecificationSheetDataPage,@Param("query") PlmTechnicalSpecificationSheetData data); void updateBMInfo(PlmTechnicalSpecificationSheetData data); + + List searchBMPrepressToolList(@Param("site") String site, @Param("codeNo") String codeNo); + + List checkPlmBmPrepressToolItemNo(PlmBmPrepressTool data); + + void saveBMPrepressTool(PlmBmPrepressTool data); + + void updateBMPrepressTool(PlmBmPrepressTool data); + + void deleteBMPrepressTool(PlmBmPrepressTool data); + + List getBMToolByRoutingAlt(@Param("site") String site, @Param("codeNo") String codeNo, @Param("partNo") String partNo, + @Param("routingRevision") Integer routingRevision, @Param("routingType") String routingType, @Param("alternativeNo") String alternativeNo); + + void saveBMToolBatch(List tools); + + List selectDictData(@Param("site") String site, @Param("dictType") String dictType); + + PartSubPropertiesValueData getToolPropertiesValue(@Param("site") String site, @Param("toolId") String toolId, @Param("recordType") String recordType, @Param("dictValue") String dictValue); + + void deleteBMPrepressToolByCodeNo(PlmBmPrepressTool data); } diff --git a/src/main/java/com/spring/modules/sampleManagement/data/PlmBmPrepressData.java b/src/main/java/com/spring/modules/sampleManagement/data/PlmBmPrepressData.java index 17b97747..fb335d53 100644 --- a/src/main/java/com/spring/modules/sampleManagement/data/PlmBmPrepressData.java +++ b/src/main/java/com/spring/modules/sampleManagement/data/PlmBmPrepressData.java @@ -1,11 +1,15 @@ package com.spring.modules.sampleManagement.data; import com.spring.modules.sampleManagement.entity.PlmBmPrepress; +import com.spring.modules.sampleManagement.entity.PlmBmPrepressTool; import lombok.Data; import org.apache.ibatis.type.Alias; +import java.util.List; + @Data @Alias("PlmBmPrepressData") public class PlmBmPrepressData extends PlmBmPrepress { + List toolList; } diff --git a/src/main/java/com/spring/modules/sampleManagement/entity/PlmBmPrepressTool.java b/src/main/java/com/spring/modules/sampleManagement/entity/PlmBmPrepressTool.java new file mode 100644 index 00000000..404ebc8c --- /dev/null +++ b/src/main/java/com/spring/modules/sampleManagement/entity/PlmBmPrepressTool.java @@ -0,0 +1,65 @@ +package com.spring.modules.sampleManagement.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +@Data +@TableName("plm_bm_prepress_tool") +public class PlmBmPrepressTool { + /** + * Site + */ + private String site; + /** + * 技术参数卡编码 + */ + private String codeNo; + /** + * 序号(数据库) + */ + private Integer itemNo; + /** + * 序号(用户) + */ + private Integer seqNo; + /** + * 工具编码 + */ + private String toolId; + /** + * 工具描述 + */ + private String toolDesc; + /** + * 横排数 + */ + private String numberAcross; + /** + * 竖排数 + */ + private String numberDown; + /** + * 创建时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createDate; + /** + * 创建人 + */ + private String createBy; + /** + * 更新时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateDate; + /** + * 更新人 + */ + private String updateBy; +} diff --git a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java index 777b2a1f..f7e193e1 100644 --- a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java +++ b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java @@ -34,6 +34,7 @@ import com.spring.modules.sampleManagement.dao.TechnicalSpecificationMapper; import com.spring.modules.sampleManagement.dao.UpBMRevNoData; import com.spring.modules.sampleManagement.data.*; import com.spring.modules.sampleManagement.entity.NodeVo; +import com.spring.modules.sampleManagement.entity.PlmBmPrepressTool; import com.spring.modules.sampleManagement.entity.PlmTechnicalSpecificationSheet; import com.spring.modules.sampleManagement.service.TechnicalSpecificationService; import com.spring.modules.sift.entity.QuerySavedDetail; @@ -44,6 +45,7 @@ import com.spring.modules.sys.entity.DictData; import com.spring.modules.sys.entity.SysUserEntity; import com.spring.modules.sys.entity.dto.DictDto; import com.spring.modules.sys.service.CheckLdapDirectory; +import com.spring.modules.sys.service.impl.DictDataServiceImpl; import org.apache.ibatis.session.SqlSession; import org.apache.shiro.SecurityUtils; import org.slf4j.Logger; @@ -107,6 +109,8 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification //记录日志使用 private static final Logger logger = LoggerFactory.getLogger(TechnicalSpecificationServiceImpl.class); + @Autowired + private DictDataServiceImpl dictDataServiceImpl; @Override public PageUtils technicalSpecificationListSearch(PlmTechnicalSpecificationSheetData inData){ @@ -667,10 +671,10 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification public Map searchBMRoute(PlmBmBomData data){ HashMap map = new HashMap<>(); List RoutingDetailEntity=technicalSpecificationMapper.getBMRouteDetail(data); - if(RoutingDetailEntity.size()>1){ + if (RoutingDetailEntity.size() > 1) { throw new RuntimeException("物料Route状态不为Buildable!请联系管理员员"); } - if(RoutingDetailEntity.isEmpty()){ + if (RoutingDetailEntity.isEmpty()) { throw new RuntimeException("未找到该物料编码的工艺路线或工艺路线不是Build状态!"); } List list= technicalSpecificationMapper.searchBMRoute(RoutingDetailEntity.get(0)); @@ -770,18 +774,26 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification @Override - public List searchBMPrepressDetail(PlmBmPrepressData data){ - return technicalSpecificationMapper.searchBMPrepressDetail(data); + public PlmBmPrepressData searchBMPrepressDetail(PlmBmPrepressData data){ + List plmBmPrepressData = technicalSpecificationMapper.searchBMPrepressDetail(data); + PlmBmPrepressData bmPrepressData = new PlmBmPrepressData(); + if (!plmBmPrepressData.isEmpty()) { + bmPrepressData = plmBmPrepressData.get(0); + } + // 查工具 + List tools = technicalSpecificationMapper.searchBMPrepressToolList(data.getSite(), data.getCodeNo()); + bmPrepressData.setToolList(tools); + return bmPrepressData; } @Override - public void updateBMPrepressDetail(PlmBmPrepressData data){ + public void updateBMPrepressDetail(PlmBmPrepressData data) { SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); data.setUpdateBy(sysUserEntity.getUsername()); - List check=technicalSpecificationMapper.searchBMPrepressDetail(data); - if(check.size()>0){ + List check = technicalSpecificationMapper.searchBMPrepressDetail(data); + if (!check.isEmpty()) { technicalSpecificationMapper.updateBMPrepressDetail(data); - }else { + } else { technicalSpecificationMapper.saveBMPrepressDetail(data); } } @@ -792,30 +804,25 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification } @Override - public void saveBMPrepressColor(PlmBmPrepressColorData data){ + public void saveBMPrepressColor(PlmBmPrepressColorData data) { SysUserEntity sysUserEntity = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); data.setUpdateBy(sysUserEntity.getUsername()); - if(data.getId()==0){ - List checkOrder=technicalSpecificationMapper.checkPlmBmPrepressColorOrder(data); - if(checkOrder.size()>0){ + if (data.getId() == 0) { + List checkOrder = technicalSpecificationMapper.checkPlmBmPrepressColorOrder(data); + if (!checkOrder.isEmpty()) { throw new RuntimeException("该色序号已经重复!"); } technicalSpecificationMapper.saveBMPrepressColor(data); - }else{ + } else { technicalSpecificationMapper.updateBMPrepressColor(data); } } @Override public void deleteBMPrepressColor(PlmBmPrepressColorData data){ - technicalSpecificationMapper.deleteBMPrepressColor(data); - } - - - @Override public List searchBMPrintOtherDetail(PlmBmPrintOtherData data){ return technicalSpecificationMapper.searchBMPrintOtherDetail(data); @@ -2136,6 +2143,109 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification return new PageUtils(list, count.intValue(), querySavedVo.getNo(), querySavedVo.getSize()); } + /** + * 新增工具 + * @param data + */ + @Override + public void saveBMPrepressTool(PlmBmPrepressTool data) { + List checkTools = technicalSpecificationMapper.checkPlmBmPrepressToolItemNo(data); + if (checkTools.isEmpty()) { + data.setItemNo(1); + } else { + data.setItemNo(checkTools.get(0).getItemNo() + 1); + } + technicalSpecificationMapper.saveBMPrepressTool(data); + } + + /** + * 编辑工具 + * @param data + */ + @Override + public void updateBMPrepressTool(PlmBmPrepressTool data) { + technicalSpecificationMapper.updateBMPrepressTool(data); + } + + /** + * 删除工具 + * @param data + */ + @Override + public void deleteBMPrepressTool(PlmBmPrepressTool data){ + technicalSpecificationMapper.deleteBMPrepressTool(data); + } + + /** + * 获取子料的序号 + * @param data + * @return + */ + @Override + public Integer getBMToolSeqNo(PlmBmPrepressTool data) { + Integer seqNo = 0; + List checkTools = technicalSpecificationMapper.checkPlmBmPrepressToolItemNo(data); + if (checkTools.isEmpty()) { + seqNo = 1; + } else { + seqNo = checkTools.get(0).getSeqNo() + 1; + } + return seqNo; + } + + /** + * 一键导入 + */ + @Override + @Transactional + public void saveBMToolBatch(PlmBmPrepressTool data) { + // 工序信息 + PlmBmBomData plmBmBomData = new PlmBmBomData(); + plmBmBomData.setSite(data.getSite()); + plmBmBomData.setCodeNo(data.getCodeNo()); + List RoutingDetails = technicalSpecificationMapper.getBMRouteDetail(plmBmBomData); + if (RoutingDetails.size() > 1) { + throw new RuntimeException("物料Route状态不为Buildable!请联系管理员员"); + } + if (RoutingDetails.isEmpty()) { + throw new RuntimeException("未找到该物料编码的工艺路线或工艺路线不是Build状态!"); + } + RoutingDetailEntity routingDetail = RoutingDetails.get(0); + // 根据工序替代查出routing tool + List tools = technicalSpecificationMapper.getBMToolByRoutingAlt(data.getSite(), data.getCodeNo(), routingDetail.getPartNo(), routingDetail.getRoutingRevision(), routingDetail.getRoutingType(), routingDetail.getAlternativeNo()); + if (tools.isEmpty()) { + throw new RuntimeException("未找到该物料的工艺路线工具!"); + } + Integer no = 1; + for (PlmBmPrepressTool tool : tools) { + tool.setCreateBy(data.getCreateBy()); + tool.setItemNo(no); + tool.setSeqNo(no); + no++; + // 先查数据字典确认属性 根据属性查横排数 竖排数 + String dictType = "bm_prepress_tool"; + List dictDataList = technicalSpecificationMapper.selectDictData(data.getSite(), dictType); + if (dictDataList.isEmpty()) { + throw new RuntimeException("未找到字典类型:" + dictType); + } + for (DictData dictData : dictDataList) { + // 获取属性值 + String recordType = "TL"; + PartSubPropertiesValueData valueData = technicalSpecificationMapper.getToolPropertiesValue(data.getSite(), tool.getToolId(), recordType, dictData.getDictValue()); + if (valueData != null) { + if ("number_across".equals(dictData.getDictLabel())) { + tool.setNumberAcross(valueData.getNumValue() != null ? valueData.getNumValue().toString() : valueData.getTextValue() != null ? valueData.getTextValue() : ""); + } else if ("number_down".equals(dictData.getDictLabel())) { + tool.setNumberDown(valueData.getNumValue() != null ? valueData.getNumValue().toString() : valueData.getTextValue() != null ? valueData.getTextValue() : ""); + } + } + } + } + // 删除再批量插入 + technicalSpecificationMapper.deleteBMPrepressToolByCodeNo(data); + technicalSpecificationMapper.saveBMToolBatch(tools); + } + private String symbolTrans(String symbol){ symbol = symbol == null ? "" : symbol.trim(); switch(symbol) { diff --git a/src/main/java/com/spring/modules/sampleManagement/service/TechnicalSpecificationService.java b/src/main/java/com/spring/modules/sampleManagement/service/TechnicalSpecificationService.java index df7bbef5..9915df16 100644 --- a/src/main/java/com/spring/modules/sampleManagement/service/TechnicalSpecificationService.java +++ b/src/main/java/com/spring/modules/sampleManagement/service/TechnicalSpecificationService.java @@ -5,6 +5,7 @@ import com.spring.modules.base.data.PlmBmModelHeaderData; import com.spring.modules.base.data.PlmBmPropertiesValueData; import com.spring.modules.base.data.PlmBmPropertiesValueHeaderData; import com.spring.modules.change.vo.ChangeRequestVo; +import com.spring.modules.part.entity.BomAllFieldEntity; import com.spring.modules.part.entity.BomDetailEntity; import com.spring.modules.part.entity.RoutingDetailEntity; import com.spring.modules.part.vo.*; @@ -17,6 +18,7 @@ import com.spring.modules.quotation.vo.QuotationDetailVo; import com.spring.modules.sampleManagement.dao.UpBMRevNoData; import com.spring.modules.sampleManagement.data.*; import com.spring.modules.sampleManagement.entity.NodeVo; +import com.spring.modules.sampleManagement.entity.PlmBmPrepressTool; import com.spring.modules.sift.vo.QuerySavedVo; import com.spring.modules.sys.entity.dto.DictDto; import org.springframework.web.bind.annotation.RequestBody; @@ -471,7 +473,7 @@ public interface TechnicalSpecificationService { * @return List * @throw */ - List searchBMPrepressDetail(PlmBmPrepressData data); + PlmBmPrepressData searchBMPrepressDetail(PlmBmPrepressData data); /** * @Description TODO @@ -1009,4 +1011,14 @@ public interface TechnicalSpecificationService { PageUtils urlFileSearch(DictDto data); PageUtils technicalSpecificationListSearchInPane(PlmTechnicalSpecificationSheetData data); + + void saveBMPrepressTool(PlmBmPrepressTool data); + + Integer getBMToolSeqNo(PlmBmPrepressTool data); + + void updateBMPrepressTool(PlmBmPrepressTool data); + + void deleteBMPrepressTool(PlmBmPrepressTool data); + + void saveBMToolBatch(PlmBmPrepressTool data); } diff --git a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml index 0ffa9ec6..6eaf65a5 100644 --- a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml +++ b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml @@ -1068,19 +1068,19 @@ @@ -1092,16 +1092,15 @@ update plm_bm_prepress - set plateNo=#{plateNo}, - cutterNumber=#{cutterNumber}, - cutterLayout=#{cutterLayout}, - [action]=#{action}, - remark=#{remark}, - feedback=#{feedback}, - update_by=#{updateBy}, - update_date=GetDate() - where site = #{site} - and code_no = #{codeNo} + set plateNo = #{plateNo}, + cutterNumber = #{cutterNumber}, + cutterLayout = #{cutterLayout}, + [action] = #{action}, + remark = #{remark}, + feedback = #{feedback}, + update_by = #{updateBy}, + update_date = GetDate() + where site = #{site} and code_no = #{codeNo} + select + site, + code_no, + item_no, + seq_no, + tool_id, + tool_desc, + number_across, + number_down, + create_date, + create_by, + update_date, + update_by + from plm_bm_prepress_tool + where site = #{site} and code_no = #{codeNo} + + + + + + insert into plm_bm_prepress_tool + (site, code_no, item_no, seq_no, tool_id, tool_desc, number_across, number_down, create_date, create_by) + values + (#{site}, #{codeNo}, #{itemNo}, #{seqNo}, #{toolId}, #{toolDesc}, #{numberAcross}, #{numberDown}, getDate(), #{createBy}) + + + + update plm_bm_prepress_tool + set seq_no = #{seqNo}, + tool_id = #{toolId}, + tool_desc = #{toolDesc}, + number_across = #{numberAcross}, + number_down = #{numberDown}, + update_date = getDate(), + update_by = #{updateBy} + where site = #{site} and code_no = #{codeNo} and item_no = #{itemNo} + + + + delete from plm_bm_prepress_tool + where site = #{site} and code_no = #{codeNo} and item_no = #{itemNo} + + + + + + insert into plm_bm_prepress_tool + (site, code_no, item_no, seq_no, tool_id, tool_desc, number_across, number_down, create_date, create_by) VALUES + + (#{item.site}, #{item.codeNo}, #{item.itemNo}, #{item.seqNo}, #{item.toolId}, #{item.toolDesc}, #{item.numberAcross}, #{item.numberDown}, getDate(), #{item.createBy}) + + + + + + + + + delete from plm_bm_prepress_tool + where site = #{site} and code_no = #{codeNo} + \ No newline at end of file