update:修改贴标信息
This commit is contained in:
@@ -17,6 +17,8 @@ import org.nl.wms.das.device.record.service.IDasDeviceErrorRecordService;
|
||||
import org.nl.wms.das.device.record.service.dao.DasDeviceErrorRecord;
|
||||
import org.nl.wms.das.inspection.service.IDasQualityInspectionService;
|
||||
import org.nl.wms.database.brick.service.IMdBaseBrickInfoService;
|
||||
import org.nl.wms.database.customer.service.IMdCsCustomerbaseService;
|
||||
import org.nl.wms.database.customer.service.dao.MdCsCustomerbase;
|
||||
import org.nl.wms.database.material.service.IMdBaseMaterialService;
|
||||
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
@@ -130,6 +132,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Autowired
|
||||
private YZMapper yzMapper;
|
||||
|
||||
@Autowired
|
||||
private IMdCsCustomerbaseService mdCsCustomerbaseService;
|
||||
|
||||
@Autowired
|
||||
private IDasDeviceErrorRecordService dasDeviceErrorRecordService;
|
||||
|
||||
@@ -519,21 +524,28 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
GroupBindMaterialStatusEnum.BOUND.getValue());
|
||||
String materialId = groupInfo.getMaterial_id();
|
||||
MdBaseMaterial baseMaterial = materialService.getById(materialId);
|
||||
BigDecimal materialWeight = ObjectUtil.isNotEmpty(groupInfo.getMaterial_weight())
|
||||
? groupInfo.getMaterial_weight() : BigDecimal.valueOf(0);
|
||||
String singleWeightStr = baseMaterial.getSingle_weight();
|
||||
BigDecimal singleWeight = BigDecimal.valueOf(Double.parseDouble(singleWeightStr));
|
||||
BigDecimal multiply = materialWeight.multiply(singleWeight).multiply(BigDecimal.valueOf(1000));
|
||||
BigDecimal totalWeight = singleWeight.multiply(BigDecimal.valueOf(groupInfo.getMaterial_qty()));
|
||||
// 获取工单
|
||||
PdmBdWorkorder workorder = workorderService.selectApplyLabelInfo(groupInfo.getWorkorder_code());
|
||||
if (null == workorder){
|
||||
return ApplyTaskResponse.responseError(requestNo, "未查询到工单信息!");
|
||||
}
|
||||
MdCsCustomerbase customerbase = mdCsCustomerbaseService.getById(workorder.getCustomer());
|
||||
if (null == customerbase){
|
||||
return ApplyTaskResponse.responseError(requestNo, "未查询到客户信息!");
|
||||
}
|
||||
// 组合
|
||||
sb.append(workorder.getOrder_number()).append("##")
|
||||
.append(workorder.getProduct_code()).append("##")
|
||||
sb.append(customerbase.getCust_name()).append("##")
|
||||
.append(workorder.getMaterial_name()).append("##")
|
||||
.append(workorder.getMaterial_code()).append("##")
|
||||
.append(workorder.getMaterial_spec()).append("##")
|
||||
.append(workorder.getMaterial_code()).append("##")
|
||||
.append(singleWeight).append("##")
|
||||
.append(groupInfo.getMaterial_qty()).append("##")
|
||||
.append(totalWeight).append("##")
|
||||
.append(workorder.getProduct_code()).append("##")
|
||||
.append(workorder.getMaterial_model()).append("##")
|
||||
.append(multiply).append("##")
|
||||
.append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy/MM/dd"));
|
||||
return ApplyTaskResponse.responseOk(requestNo, sb.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user