|
|
|
@ -134,14 +134,6 @@ public class RohsController { |
|
|
|
if (StringUtils.isBlank(rohs.getRejectFlag())) { |
|
|
|
rohs.setRejectFlag("N"); |
|
|
|
} |
|
|
|
if (rohs.getMaterialList() != null) { |
|
|
|
if (!rohs.getMaterialList().isEmpty()) { |
|
|
|
rohs.setIfsPartNo(rohs.getMaterialList().get(0).getTestPartNo()); |
|
|
|
} else { |
|
|
|
rohs.setIfsPartNo(null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
rohsService.save(rohs); |
|
|
|
rohsService.saveOrUpdateMaterials(rohs); |
|
|
|
return R.ok().put("referenceNo", newReferenceNo); |
|
|
|
@ -174,13 +166,6 @@ public class RohsController { |
|
|
|
QueryWrapper<RohsEntity> updateWrapper = new QueryWrapper<>(); |
|
|
|
updateWrapper.eq("site", rohs.getSite()).eq("reference_no", rohs.getReferenceNo()); |
|
|
|
|
|
|
|
if (rohs.getMaterialList() != null) { |
|
|
|
if (!rohs.getMaterialList().isEmpty()) { |
|
|
|
rohs.setIfsPartNo(rohs.getMaterialList().get(0).getTestPartNo()); |
|
|
|
} else { |
|
|
|
rohs.setIfsPartNo(null); |
|
|
|
} |
|
|
|
} |
|
|
|
rohsService.update(rohs, updateWrapper); |
|
|
|
rohsService.saveOrUpdateMaterials(rohs); |
|
|
|
return R.ok(); |
|
|
|
@ -207,11 +192,6 @@ public class RohsController { |
|
|
|
rohsService.saveOrUpdateMaterials(rohs); |
|
|
|
|
|
|
|
RohsEntity updateEntity = new RohsEntity(); |
|
|
|
if (rohs.getMaterialList() != null && !rohs.getMaterialList().isEmpty()) { |
|
|
|
updateEntity.setIfsPartNo(rohs.getMaterialList().get(0).getTestPartNo()); |
|
|
|
} else { |
|
|
|
updateEntity.setIfsPartNo(null); |
|
|
|
} |
|
|
|
updateEntity.setUpdateDate(new Date()); |
|
|
|
updateEntity.setUpdateBy(currentUserName); |
|
|
|
QueryWrapper<RohsEntity> updateWrapper = new QueryWrapper<>(); |
|
|
|
@ -224,7 +204,6 @@ public class RohsController { |
|
|
|
* 下达 |
|
|
|
*/ |
|
|
|
@PostMapping("/issue") |
|
|
|
@Transactional |
|
|
|
public R issue(@RequestBody RohsSubmitVo data) { |
|
|
|
if (StringUtils.isBlank(data.getSite()) || StringUtils.isBlank(data.getReferenceNo()) || StringUtils.isBlank(data.getMenuId())) { |
|
|
|
return R.error("工厂(site)、序列号(referenceNo)和菜单ID(menuId)不能为空"); |
|
|
|
@ -243,7 +222,6 @@ public class RohsController { |
|
|
|
* 审批提交(同意/驳回) |
|
|
|
*/ |
|
|
|
@PostMapping("/submit") |
|
|
|
@Transactional |
|
|
|
public R submit(@RequestBody RohsSubmitVo data) { |
|
|
|
if (StringUtils.isBlank(data.getSite()) || StringUtils.isBlank(data.getReferenceNo())) { |
|
|
|
return R.error("工厂(site)和序列号(referenceNo)不能为空"); |
|
|
|
|