Browse Source

2025-07-10

1、印前工序模版调整
     1、取消现有的字段,使用列表方式
         1.1   列表字段:看图(需要中英文)
     2、带出该物料对应版本、替代的刀具信息
         2.1   根据Routing中的工艺指导的类型是Plate No.带到印版编号/PlateNo
         2.2   根据版本+替代带出Routing Tools的工具编码、工具名称
         2.3   根据该工具属性编码为"Number across、Number down"的属性值
master
fengyuan_yang 8 months ago
parent
commit
b6ed548e32
  1. 68
      src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java
  2. 22
      src/main/java/com/spring/modules/sampleManagement/dao/TechnicalSpecificationMapper.java
  3. 4
      src/main/java/com/spring/modules/sampleManagement/data/PlmBmPrepressData.java
  4. 65
      src/main/java/com/spring/modules/sampleManagement/entity/PlmBmPrepressTool.java
  5. 146
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
  6. 14
      src/main/java/com/spring/modules/sampleManagement/service/TechnicalSpecificationService.java
  7. 154
      src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

68
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<PlmBmPrepressData> 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();
}
}

22
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<PlmTechnicalSpecificationSheetData> technicalSpecificationListSearchInPane(Page<PlmTechnicalSpecificationSheetData> plmTechnicalSpecificationSheetDataPage,@Param("query") PlmTechnicalSpecificationSheetData data);
void updateBMInfo(PlmTechnicalSpecificationSheetData data);
List<PlmBmPrepressTool> searchBMPrepressToolList(@Param("site") String site, @Param("codeNo") String codeNo);
List<PlmBmPrepressTool> checkPlmBmPrepressToolItemNo(PlmBmPrepressTool data);
void saveBMPrepressTool(PlmBmPrepressTool data);
void updateBMPrepressTool(PlmBmPrepressTool data);
void deleteBMPrepressTool(PlmBmPrepressTool data);
List<PlmBmPrepressTool> 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<PlmBmPrepressTool> tools);
List<DictData> 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);
}

4
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<PlmBmPrepressTool> toolList;
}

65
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;
}

146
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<String, Object> searchBMRoute(PlmBmBomData data){
HashMap<String, Object> map = new HashMap<>();
List<RoutingDetailEntity> 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<RoutingComponentVo> list= technicalSpecificationMapper.searchBMRoute(RoutingDetailEntity.get(0));
@ -770,18 +774,26 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
@Override
public List<PlmBmPrepressData> searchBMPrepressDetail(PlmBmPrepressData data){
return technicalSpecificationMapper.searchBMPrepressDetail(data);
public PlmBmPrepressData searchBMPrepressDetail(PlmBmPrepressData data){
List<PlmBmPrepressData> plmBmPrepressData = technicalSpecificationMapper.searchBMPrepressDetail(data);
PlmBmPrepressData bmPrepressData = new PlmBmPrepressData();
if (!plmBmPrepressData.isEmpty()) {
bmPrepressData = plmBmPrepressData.get(0);
}
// 查工具
List<PlmBmPrepressTool> 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<PlmBmPrepressData> check=technicalSpecificationMapper.searchBMPrepressDetail(data);
if(check.size()>0){
List<PlmBmPrepressData> 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<PlmBmPrepressColorData> checkOrder=technicalSpecificationMapper.checkPlmBmPrepressColorOrder(data);
if(checkOrder.size()>0){
if (data.getId() == 0) {
List<PlmBmPrepressColorData> 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<PlmBmPrintOtherData> 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<PlmBmPrepressTool> 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<PlmBmPrepressTool> 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<RoutingDetailEntity> 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<PlmBmPrepressTool> 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<DictData> 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) {

14
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<PlmBmTpInfoDetailData>
* @throw
*/
List<PlmBmPrepressData> 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);
}

154
src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

@ -1068,19 +1068,19 @@
<select id="searchBMPrepressDetail" resultType="PlmBmPrepressData">
select Site,
code_no,
plateNo,
cutterNumber,
cutterLayout,
[action],
remark,
feedback,
update_by,
update_date
select
Site,
code_no,
plateNo,
cutterNumber,
cutterLayout,
[action],
remark,
feedback,
update_by,
update_date
from plm_bm_prepress
where site = #{site}
and code_no = #{codeNo}
where site = #{site} and code_no = #{codeNo}
</select>
<insert id="saveBMPrepressDetail">
@ -1092,16 +1092,15 @@
<update id="updateBMPrepressDetail">
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}
</update>
<select id="searchBMPrepressColor" resultType="PlmBmPrepressColorData">
@ -1908,17 +1907,15 @@
and c.status = 'Buildable'
</select>
<select id="getBMRouteDetail" resultType="com.spring.modules.part.entity.RoutingDetailEntity">
select a.site,
a.routing_type,
a.routing_revision,
a.routing_alternative_no alternativeNo,
b.final_part_no partNo
select
a.site,
a.routing_type,
a.routing_revision,
a.routing_alternative_no alternativeNo,
b.final_part_no partNo
from plm_technical_specification_sheet a
left join view_Project_final_Part b on a.site = b.site and a.test_part_no = b.test_part_no
left join plm_routing_detail c
on a.site = c.site and b.final_part_no = c.part_no AND
a.routing_revision = c.routing_revision
and a.routing_alternative_no = c.alternative_no and a.routing_type = c.routing_type
left join view_Project_final_Part b on a.site = b.site and a.test_part_no = b.test_part_no
left join plm_routing_detail c on a.site = c.site and b.final_part_no = c.part_no AND a.routing_revision = c.routing_revision and a.routing_alternative_no = c.alternative_no and a.routing_type = c.routing_type
where a.site = #{site}
and a.code_no = #{codeNo}
and a.project_id = b.project_id
@ -2969,4 +2966,97 @@
update_by = #{userName}
where site = #{site} and code_no = #{codeNo}
</update>
<select id="searchBMPrepressToolList" resultType="com.spring.modules.sampleManagement.entity.PlmBmPrepressTool">
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}
</select>
<select id="checkPlmBmPrepressToolItemNo" resultType="com.spring.modules.sampleManagement.entity.PlmBmPrepressTool">
select
site,
code_no,
item_no,
seq_no
from plm_bm_prepress_tool
where site = #{site} and code_no = #{codeNo}
order by item_no desc
</select>
<insert id="saveBMPrepressTool">
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})
</insert>
<update id="updateBMPrepressTool">
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}
</update>
<delete id="deleteBMPrepressTool">
delete from plm_bm_prepress_tool
where site = #{site} and code_no = #{codeNo} and item_no = #{itemNo}
</delete>
<select id="getBMToolByRoutingAlt" resultType="com.spring.modules.sampleManagement.entity.PlmBmPrepressTool">
select
rt.site,
#{codeNo} as codeNo,
rt.tool_id,
th.tool_description as toolDesc
from routing_tool as rt
left join tool_header as th on rt.site = th.site and rt.tool_id = th.tool_id
where rt.site = #{site} and rt.part_no = #{partNo} and rt.routing_revision = #{routingRevision} and rt.routing_type = #{routingType} and rt.alternative_no = #{alternativeNo}
</select>
<insert id="saveBMToolBatch">
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
<foreach collection="list" item="item" index="index" separator=",">
(#{item.site}, #{item.codeNo}, #{item.itemNo}, #{item.seqNo}, #{item.toolId}, #{item.toolDesc}, #{item.numberAcross}, #{item.numberDown}, getDate(), #{item.createBy})
</foreach>
</insert>
<select id="selectDictData" resultType="com.spring.modules.sys.entity.DictData">
SELECT
dict_label,
dict_value
FROM sys_dict_data
where site = #{site} and dict_type = #{dictType} and status = 'Y'
</select>
<select id="getToolPropertiesValue" resultType="com.spring.modules.base.data.PartSubPropertiesValueData">
select
TextValue,
NumValue
from PartSubPropertiesValue
where site = #{site} and PartNo = #{toolId} and RecordType = #{recordType} and PropertiesItemNo = #{dictValue}
</select>
<delete id="deleteBMPrepressToolByCodeNo">
delete from plm_bm_prepress_tool
where site = #{site} and code_no = #{codeNo}
</delete>
</mapper>
Loading…
Cancel
Save