|
@@ -232,4 +232,59 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
|
|
|
return weighingManagement;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 出库管理添加皮重检斤管理信息
|
|
|
+ * @param weighingManagement
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public String addTare(WeighingManagement weighingManagement) {
|
|
|
+ String relationId=IdGenerator.generateUUID();
|
|
|
+ weighingManagement.setId(IdGenerator.generateUUID());
|
|
|
+ weighingManagement.setRelationId(relationId);
|
|
|
+ //生成质检信息
|
|
|
+ QualityInspectionManagement qualityInspectionManagement = new QualityInspectionManagement();
|
|
|
+ qualityInspectionManagement.setId(IdGenerator.generateUUID());
|
|
|
+ qualityInspectionManagement.setRelationId(relationId);
|
|
|
+ qualityInspectionManagement.setContractNo(weighingManagement.getContractNo());
|
|
|
+ qualityInspectionManagement.setCarNumber(weighingManagement.getCarNumber());
|
|
|
+ qualityInspectionManagement.setCompId(weighingManagement.getCompId());
|
|
|
+ qualityInspectionManagement.setGoodsName(weighingManagement.getGoodsName());
|
|
|
+ qualityInspectionManagement.setBinNumber(weighingManagement.getBinNumber());
|
|
|
+ qualityInspectionManagement.setWarehouseName(weighingManagement.getWarehouseName());
|
|
|
+ qualityInspectionManagement.setStorageTagNo(weighingManagement.getStorageNumber());
|
|
|
+ boolean two=qualityInspectionManagementService.insert(qualityInspectionManagement);
|
|
|
+ boolean one=this.insert(weighingManagement);
|
|
|
+ //成功返回ok
|
|
|
+ if (one &&two ) {
|
|
|
+ return "OK";
|
|
|
+ } else {
|
|
|
+ return "NG";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 出库管理编辑皮重检斤管理信息
|
|
|
+ * @param weighingManagement
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public String editTareOut(WeighingManagement weighingManagement) {
|
|
|
+ //状态改为已称皮重
|
|
|
+ weighingManagement.setStatus(StatusEnum.TARED.getName());
|
|
|
+ weighingManagement.setStatusFlag(StatusEnum.TARED.getFlag());
|
|
|
+ //更新检斤信息
|
|
|
+ boolean one = this.updateById(weighingManagement);
|
|
|
+ //更新质检信息
|
|
|
+ boolean two = qualityInspectionManagementService.updateById(weighingManagement.getQualityInspectionManagement());
|
|
|
+ //成功返回ok
|
|
|
+ if (one &&two ) {
|
|
|
+ return "OK";
|
|
|
+ } else {
|
|
|
+ return "NG";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|