|
|
|
@ -192,6 +192,14 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
throw new XJException(msg, Integer.parseInt(code)); |
|
|
|
} |
|
|
|
masterPartInformationMapper.insert(data); |
|
|
|
// 如果选择了模板则新增属性 |
|
|
|
if (StringUtils.isNotBlank(data.getCodeNo())) { |
|
|
|
PartSubPropertiesValueData valueData = new PartSubPropertiesValueData(); |
|
|
|
BeanUtils.copyProperties(data,valueData); |
|
|
|
valueData.setRecordType("MP"); |
|
|
|
partInformationMapper.savePartSubPropertiesValueHeader(valueData); |
|
|
|
partInformationMapper.savePartSubPropertiesValue(valueData); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -296,6 +304,7 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
* @param data |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void masterPartInformationDelete(MasterPartInformationVo data) { |
|
|
|
for (MasterPartInformationEntity entity : data.getInformationList()) { |
|
|
|
// 删除材料信息数据 |
|
|
|
@ -316,7 +325,16 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public List<PartSubPropertiesValueData> getMasterPartItem(PartSubPropertiesValueData data) { |
|
|
|
// // 判断物料是否选择了模板 |
|
|
|
// MasterPartInformationEntity masterPart = masterPartInformationMapper.selectOne(new QueryWrapper<MasterPartInformationEntity>().eq("part_no", data.getPartNo())); |
|
|
|
// if (StringUtils.isNotBlank(masterPart.getCodeNo())) { |
|
|
|
// // 如果选择了模板但物料属性是空,则调用接口查出属性新增 |
|
|
|
// |
|
|
|
// } |
|
|
|
// // |
|
|
|
|
|
|
|
// 查询是否已存在属性 |
|
|
|
List<PartSubPropertiesValueHeaderData> checkValueHeaderData = partInformationMapper.checkValueHeaderData(data); |
|
|
|
// 初次或修改物料模板则重新加载模板 |
|
|
|
@ -384,6 +402,7 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
* @param inData |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void addMasterPartItem(PartSubPropertiesValueData inData) { |
|
|
|
for(PartSubPropertiesValueData itemDate : inData.getItemList()) { |
|
|
|
itemDate.setSite(inData.getSite()); |
|
|
|
@ -410,6 +429,7 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
* @param inData |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void deleteMasterPartItem(PartSubPropertiesValueData inData) { |
|
|
|
for(PartSubPropertiesValueData itemDate : inData.getItemList()) { |
|
|
|
partInformationMapper.deletePartItem(itemDate); |
|
|
|
@ -421,6 +441,7 @@ public class MasterPartInformationServiceImpl extends ServiceImpl<MasterPartInfo |
|
|
|
* @param data |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void commitItemValue(PartSubPropertiesValueData data) { |
|
|
|
// // 修改明细记录信息 |
|
|
|
// for (int i = 0; i < data.getItemList().size(); i++) { |
|
|
|
|