Merge remote-tracking branch 'origin/master'

master
zpl 3 years ago
commit c0de312388

@ -116,7 +116,7 @@ public class ReportController {
* @param paramMap
* @return
*/
@GetMapping("/findAbnormalRecord")
@PostMapping("/findAbnormalRecord")
public R findAbnormalRecord(@RequestBody(required = false) Map paramMap){
try{
List<Map<String, Object>> result = reportService.findAbnormalRecord(paramMap);
@ -125,4 +125,19 @@ public class ReportController {
return R.failed(e.getMessage());
}
}
/**
*
* @param paramMap
* @return
*/
@PostMapping("/shopOrderSchedule")
public R shopOrderSchedule(@RequestBody(required = false) Map paramMap){
try{
List<Map<String, Object>> result = reportService.shopOrderSchedule(paramMap);
return R.ok(result);
}catch (Exception e){
return R.failed(e.getMessage());
}
}
}

@ -36,4 +36,11 @@ public interface ReportMapper {
List<Map<String,Object>> findQualityInspectionReport(Map paramMap);
List<Map<String,Object>> findAbnormalRecord(Map paramMap);
/**
*
* @param paramMap
* @return
*/
List<Map<String,Object>> shopOrderSchedule(Map paramMap);
}

@ -40,4 +40,11 @@ public interface ReportService {
* @return
*/
List<Map<String, Object>> findAbnormalRecord(Map paramMap);
/**
*
* @param paramMap
* @return
*/
List<Map<String, Object>> shopOrderSchedule(Map paramMap);
}

@ -237,7 +237,42 @@ public class ReportServiceImpl implements ReportService {
paramMap.put("site",site);
paramMap.put("locale",LocaleContextHolder.getLocale().getLanguage());
List<Map<String, Object>> findAbnormalRecord = reportMapper.findAbnormalRecord(paramMap);
return null;
Map<String, List<DataFieldList>> dataFieldListMap = new HashMap<>();
DataField dataField = new DataField();
dataField.setSite(site);
dataField.setDataField("REASON_CATEGORY");
//责任部门
dataField.setDataField("RESPONSIBILITY_DEPARTMENT");
List<DataFieldList> dataFieldList = dataFieldListMapper.findDataFieldList(dataField);
if (dataFieldList != null && dataFieldList.size() > 0) {
dataFieldListMap = dataFieldList.stream().collect(Collectors.groupingBy(DataFieldList::getDataValue));
}
for (int i = 0; i < findAbnormalRecord.size(); i++) {
Map<String, Object> temporaryMap = findAbnormalRecord.get(i);
String dutyDepart = (String) temporaryMap.get("DUTY_DEPART");
if (StringUtils.isBlank(dutyDepart)) {
findAbnormalRecord.get(i).put("DUTY_DEPART_DESCRIPTION", "");
continue;
}
String[] dutyDepartSplit = dutyDepart.split(",");
StringBuilder dutyDepartDescription = new StringBuilder();
for (int j = 0; j < dutyDepartSplit.length; j++) {
dutyDepartDescription.append(dataFieldListMap.get(dutyDepartSplit[j]).get(0).getDescription()).append(";");
}
findAbnormalRecord.get(i).put("DUTY_DEPART_DESCRIPTION", dutyDepartDescription);
}
return findAbnormalRecord;
}
@Override
public List<Map<String, Object>> shopOrderSchedule(Map paramMap) {
String site = CommonMethods.getSite();
paramMap.put("site",site);
paramMap.put("locale",LocaleContextHolder.getLocale().getLanguage());
return reportMapper.shopOrderSchedule(paramMap);
}
}

@ -307,7 +307,7 @@
LEFT JOIN RESOURCE_TYPE rt ON rt.RESOURCE_TYPE = zsd.RESOURCE_TYPE AND rt.SITE = zab.SITE
LEFT JOIN WORK_CENTER wc ON wc.WORK_CENTER = SUBSTR(o.OPERATION,1,INSTR(o.OPERATION,'_')-1) AND wc.site = zab.SITE
<where>
zab."TYPE" ='Z'
zab.SITE = #{site} AND zab."TYPE" ='Z'
<if test="workCenter != null and workCenter != ''">
AND wc.WORK_CENTER LIKE '%${workCenter}%'
</if>
@ -350,7 +350,7 @@
</select>
<select id="findAbnormalRecord" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT wc.WORK_CENTER ,zab.PRODUCT_CATEGORY ,cf.VALUE WORK_ORDER,so.SHOP_ORDER SHOP_ORDER ,
SELECT wct.DESCRIPTION WORK_CENTER,zab.ITEM_NUMBER ITEM_NUMBER,zab.PRODUCT_CATEGORY ,cf.VALUE WORK_ORDER,so.SHOP_ORDER SHOP_ORDER ,
i.ITEM ITEM,it.DESCRIPTION ITEM_DESCRIPTION,zab.SFC SFC,zab.ABNORMAL_NO ABNORMAL_NO,
CASE WHEN zab."TYPE" = 'Z' THEN '质量异常'
WHEN zab."TYPE" = 'S' THEN '设备异常'
@ -373,34 +373,117 @@
WHEN zabd.ABNORMAL_METHOD = 'FW' THEN '返修(外协)'
WHEN zabd.ABNORMAL_METHOD = 'FB' THEN '返修(不返回原工艺)'
ELSE ''
END ABNORMAL_METHOD,zabd.RESOLVE_DATE_TIME RESOLVE_DATE_TIME,
END ABNORMAL_METHOD,
zabd.RESOLVE_DATE_TIME RESOLVE_DATE_TIME,
znu3.FULL_NAME RESOLVE_USER,zabd.CLOSED_DATE_TIME CANCEL_DATE_TIME ,
znu4.FULL_NAME CANCEL_USER,zabd.RESOLVE_REMARK RESOLVE_REMARK,
zabd.ABNORMAL_REASON ABNORMAL_REASON,zabd.BEFORE_MEASURE BEFORE_MEASURE
zabd.ABNORMAL_REASON ABNORMAL_REASON,zabd.BEFORE_MEASURE BEFORE_MEASURE,
ug.DESCRIPTION RESOLVE_SEND_USER_GROUP,
TRUNC(TO_NUMBER(zabd.RESOLVE_DATE_TIME - zsr.CREATED_DATE_TIME)*24,2) RESOLVE_DURATION,
zabd.DUTY_DEPART DUTY_DEPART
FROM Z_ABNORMAL_BILL zab
LEFT JOIN Z_ABNORMAL_NC_CODE zanc ON zanc.ABNORMAL_BILL_BO = zab.HANDLE
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE zabd ON zabd.ABNORMAL_BILL_BO = zab.HANDLE
LEFT JOIN WORK_CENTER wc ON wc.WORK_CENTER = SUBSTR(zab.OPERATION,1,INSTR(zab.OPERATION,'_')-1)
LEFT JOIN NC_CODE nc ON zanc.NC_CODE = nc.NC_CODE AND nc.SITE = zab.SITE
LEFT JOIN NC_CODE_T nct ON nct.NC_CODE_BO = nc.HANDLE AND nct.LOCALE = 'zh'
LEFT JOIN SHOP_ORDER so ON so.SHOP_ORDER = zab.SHOP_ORDER AND so.SITE = zab.SITE
LEFT JOIN CUSTOM_FIELDS cf ON cf.HANDLE = so.HANDLE
INNER JOIN ITEM i ON i.HANDLE = zab.ITEM_BO
LEFT JOIN ITEM_T it ON it.ITEM_BO = i.HANDLE AND it.LOCALE = 'zh'
LEFT JOIN OPERATION o ON o.OPERATION = zab.OPERATION AND o.SITE = zab.SITE
LEFT JOIN OPERATION_T ot ON ot.OPERATION_BO = o.HANDLE AND ot.LOCALE = 'zh'
LEFT JOIN RESRCE r ON r.RESRCE = zab.RESRCE AND r.SITE = zab.SITE
LEFT JOIN Z_NWA_USER znu ON znu.USER_NAME = zab.PB_USER
LEFT JOIN Z_NWA_USER znu2 ON znu2.USER_NAME = zab.CREATED_USER
LEFT JOIN Z_NWA_USER znu3 ON znu3.USER_NAME = zabd.RESOLVE_USER
LEFT JOIN Z_NWA_USER znu4 ON znu4.USER_NAME = zabd.CLOSED_USER
GROUP BY wc.WORK_CENTER ,zab.PRODUCT_CATEGORY ,cf.VALUE ,so.SHOP_ORDER ,
LEFT JOIN Z_ABNORMAL_NC_CODE zanc ON zanc.ABNORMAL_BILL_BO = zab.HANDLE
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE zabd ON zabd.ABNORMAL_BILL_BO = zab.HANDLE
LEFT JOIN WORK_CENTER wc ON wc.WORK_CENTER = SUBSTR(zab.OPERATION,1,INSTR(zab.OPERATION,'_')-1)
LEFT JOIN WORK_CENTER_T wct ON wct.WORK_CENTER_BO = wc.HANDLE AND wct.LOCALE = 'zh'
LEFT JOIN NC_CODE nc ON zanc.NC_CODE = nc.NC_CODE AND nc.SITE = zab.SITE
LEFT JOIN NC_CODE_T nct ON nct.NC_CODE_BO = nc.HANDLE AND nct.LOCALE = 'zh'
LEFT JOIN SHOP_ORDER so ON so.SHOP_ORDER = zab.SHOP_ORDER AND so.SITE = zab.SITE
LEFT JOIN CUSTOM_FIELDS cf ON cf.HANDLE = so.HANDLE
LEFT JOIN ITEM i ON i.HANDLE = zab.ITEM_BO
LEFT JOIN ITEM_T it ON it.ITEM_BO = i.HANDLE AND it.LOCALE = 'zh'
LEFT JOIN OPERATION o ON o.OPERATION = zab.OPERATION AND o.SITE = zab.SITE
LEFT JOIN OPERATION_T ot ON ot.OPERATION_BO = o.HANDLE AND ot.LOCALE = 'zh'
LEFT JOIN RESRCE r ON r.RESRCE = zab.RESRCE AND r.SITE = zab.SITE
LEFT JOIN Z_NWA_USER znu ON znu.USER_NAME = zab.PB_USER
LEFT JOIN Z_NWA_USER znu2 ON znu2.USER_NAME = zab.CREATED_USER
LEFT JOIN Z_NWA_USER znu3 ON znu3.USER_NAME = zabd.RESOLVE_USER
LEFT JOIN Z_NWA_USER znu4 ON znu4.USER_NAME = zabd.CLOSED_USER
LEFT JOIN Z_SELF_REPORT zsr ON zsr.HANDLE = zab.OBJECT_BO
LEFT JOIN USER_GROUP ug ON ug.USER_GROUP = zabd.RESOLVE_SEND_USER_GROUP AND ug.SITE = zab.SITE
<where>
zab.SITE = #{site} AND (wc.WORK_CENTER = #{workCenter} OR wct.DESCRIPTION = #{workCenter})
<if test="itemNumber != null and itemNumber != ''">
AND zab.ITEM_NUMBER = #{itemNumber}
</if>
<if test="workOrder != null and workOrder != ''">
AND cf.VALUE = #{workOrder}
</if>
<if test="operation != null and operation != ''">
AND (zab.OPERATION LIKE '%${operation}%'
OR ot.DESCRIPTION LIKE '%${operation}%')
</if>
<if test="resrce != null and resrce != ''">
AND (r.RESRCE LIKE '%${resrce}%'
OR r.DESCRIPTION LIKE '%${resrce}%')
</if>
<if test="abnormalType != null and abnormalType != ''">
AND zab.TYPE = #{abnormalType}
</if>
<if test="pbUser != null and pbUser != ''">
AND (zab.PB_USER = #{pbUser} OR znu.FULL_NAME = #{pbUser})
</if>
<if test="createdUser != null and createdUser != ''">
AND (zab.CREATED_USER = #{createdUser} OR znu2.FULL_NAME = #{createdUser})
</if>
</where>
GROUP BY wct.DESCRIPTION ,zab.PRODUCT_CATEGORY ,cf.VALUE ,so.SHOP_ORDER ,
i.ITEM ,it.DESCRIPTION,zab.SFC,zab."TYPE" ,zab.ABNORMAL_NO,
zab.OPERATION,ot.DESCRIPTION,r.RESRCE,r.DESCRIPTION,
zab.CREATED_DATE_TIME ,znu.FULL_NAME,znu2.FULL_NAME,
zab.STATUS,zabd.ABNORMAL_METHOD,zabd.RESOLVE_DATE_TIME ,
znu3.FULL_NAME,zabd.CLOSED_DATE_TIME ,znu4.FULL_NAME,
zabd.RESOLVE_REMARK,zabd.ABNORMAL_REASON,zabd.BEFORE_MEASURE
zabd.RESOLVE_REMARK,zabd.ABNORMAL_REASON,zabd.BEFORE_MEASURE,
zsr.CREATED_DATE_TIME,zab.ITEM_NUMBER,
zabd.DUTY_DEPART,ug.DESCRIPTION
ORDER BY zab.CREATED_DATE_TIME DESC
</select>
<select id="shopOrderSchedule" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT wct.DESCRIPTION WORK_CENTER_DESCRIPTION,cf.VALUE ITEM_NUMBER,cf2.VALUE PRODUCT_CATEGORY,
zsd.SHOP_ORDER,it.DESCRIPTION ITEM_DESCRIPTION,zsd.PLANNED_START_DATE,
zsd.PLANNED_COMP_DATE ,zsd.ACTUAL_START_DATE ,ot.DESCRIPTION CURRENT_OPERATION_DESCRIPTION,
ot2.DESCRIPTION OPERATION_DESCRIPTION
FROM Z_SFC_DISPATCH zsd
LEFT JOIN WORK_CENTER wc ON wc.WORK_CENTER = zsd.WORK_CENTER
LEFT JOIN WORK_CENTER_T wct ON wct.WORK_CENTER_BO = wc.HANDLE AND wct.LOCALE = 'zh'
LEFT JOIN SHOP_ORDER so ON so.SHOP_ORDER = zsd.SHOP_ORDER AND so.SITE = zsd.SITE
LEFT JOIN CUSTOM_FIELDS cf ON cf.HANDLE = so.HANDLE AND cf."ATTRIBUTE" = 'ITEM_NUMBER'
LEFT JOIN CUSTOM_FIELDS cf2 ON cf2.HANDLE = so.HANDLE AND cf2."ATTRIBUTE" = 'PRODUCT_CATEGORY'
LEFT JOIN ITEM i On i.HANDLE = so.ITEM_BO
LEFT JOIN ITEM_T it ON it.ITEM_BO = so.ITEM_BO
LEFT JOIN RESRCE r ON r.RESRCE = zsd.RESRCE AND r.SITE = zsd.SITE
LEFT JOIN SFC s ON s.SFC = zsd.SFC AND s.SITE = zsd.SITE
LEFT JOIN SFC_ROUTING sr ON sr.SFC_BO = s.HANDLE
LEFT JOIN SFC_ROUTER st ON st.SFC_ROUTING_BO = sr.HANDLE
LEFT JOIN SFC_STEP ss ON ss.SFC_ROUTER_BO = st.HANDLE AND (ss.QTY_IN_QUEUE > 0 OR ss.QTY_IN_WORK > 0)
LEFT JOIN OPERATION o ON o.OPERATION = SUBSTR(SS.OPERATION_BO,INSTR(SS.OPERATION_BO,',',1,1)+1,INSTR(SS.OPERATION_BO,',',1,2) - INSTR(SS.OPERATION_BO,',') -1) AND o.SITE = zsd.SITE
LEFT JOIN OPERATION_T ot ON ot.OPERATION_BO = o.HANDLE AND ot.LOCALE = 'zh'
LEFT JOIN OPERATION o2 ON o2.OPERATION = zsd.OPERATION AND o2.SITE = zsd.SITE
LEFT JOIN OPERATION_T ot2 ON ot2.OPERATION_BO = o2.HANDLE AND ot2.LOCALE = 'zh'
<where>
zsd.SITE = #{site}
<if test="workCenter != null and workCenter != ''">
AND (wc.WORK_CENTER = #{workCenter} OR wct.DESCRIPTION = #{workCenter})
</if>
<if test="itemNumber != null and itemNumber != ''">
AND cf.VALUE = #{itemNumber}
</if>
<if test="productCategory != null and productCategory != ''">
AND cf2.VALUE = #{productCategory}
</if>
<if test="operation != null and operation != ''">
AND (o2.OPERATION LIKE '%${operation}%'
OR ot2.DESCRIPTION LIKE '%${operation}%')
</if>
<if test="resrce != null and resrce != ''">
AND (r.RESRCE LIKE '%${resrce}%'
OR r.DESCRIPTION LIKE '%${resrce}%')
</if>
<if test="item != null and item != ''">
AND (i.ITEM LIKE '%${item}%' OR it.DESCRIPTION LIKE '%${item}%')
</if>
</where>
</select>
</mapper>

@ -87,7 +87,14 @@ public class ExportAspect {
}//for
//-------------------------------------------------------------------------------------------------------------------
Object result = joinPoint.proceed(args);
JSONObject resultJson = JSON.parseObject(JSON.toJSONString(result));
JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat));
switch (exportCode) {
case "SfcDispatch":
resultJson = JSON.parseObject(JSON.toJSONString(result));
break;
default:
break;
}
if (resultJson.get("data") instanceof List) {
List dataList = (List)resultJson.get("data");
exportData(exportCode, dataList, request, attributes.getResponse());

@ -51,8 +51,6 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
@Autowired
private CallItemService callItemService;
@Autowired
private NwaUserService nwaUserService;
@Autowired
private UserGroupMapper userGroupMapper;
@Override
@ -244,58 +242,49 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
@Override
public void refreshCallItem(String site, String user, List<CallItem> callItemList) {
LocalDateTime nowDate = LocalDateTime.now();
if (callItemList == null || callItemList.size() <= 0) {
return;
}
List<SfcDispatchDto> sfcDispatchList = new ArrayList<>();
for (CallItem callItem: callItemList) {
SfcDispatchDto sfcDispatchDto = new SfcDispatchDto();
sfcDispatchDto.setHandle(callItem.getSfcDispatchBo());
sfcDispatchList.add(sfcDispatchDto);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//删除原来的数据
callItemMapper.deleteDispatchCallItem(sfcDispatchList);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
List<CallItem> list = callItemMapper.selectDispatchCallItem(sfcDispatchList);
if (list == null || list.size() <= 0) {
return;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LocalDateTime nowDate = LocalDateTime.now();
List<CallItem> addList = new ArrayList<>();
List<CallItem> modList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
CallItem callItem = list.get(i);
String handle = callItem.getHandle();
BigDecimal reqQty = callItem.getRequiredQty();
if (reqQty.compareTo(BigDecimal.ZERO) == 1) {
if (StringUtil.isBlank(handle)) {
String component = StringUtil.trimHandle(callItem.getComponentBo());
String callItemNo = callItem.getSfc() + callItem.getStepId() + component;
callItem.setCallItemNo(callItemNo);
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo));
callItem.setCallType(Constants.CALL_TYPE_MATERIAL);
callItem.setStatus(Constants.CALL_ITEM_STATUS_NEW);
callItem.setCreateUser(user);
callItem.setCreatedDateTime(nowDate);
callItem.setModifyUser(user);
callItem.setModifiedDateTime(nowDate);
addList.add(callItem);
} else {
callItem.setRequiredQty(callItem.getIssueQty());
callItem.setModifyUser(user);
callItem.setModifiedDateTime(nowDate);
modList.add(callItem);
}
String component = StringUtil.trimHandle(callItem.getComponentBo());
String callItemNo = callItem.getSfc() + callItem.getStepId() + component;
callItem.setCallItemNo(callItemNo);
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo));
callItem.setCallType(Constants.CALL_TYPE_MATERIAL);
callItem.setStatus(Constants.CALL_ITEM_STATUS_NEW);
callItem.setCreateUser(user);
callItem.setCreatedDateTime(nowDate);
callItem.setModifyUser(user);
callItem.setModifiedDateTime(nowDate);
addList.add(callItem);
}
}
if (addList != null && addList.size() > 0) {
this.saveBatch(addList);
}
if (modList != null && modList.size() > 0) {
this.updateBatchById(modList);
}
}
@Override

@ -686,6 +686,7 @@
CASE WHEN CC.VALUE = '9' THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO,
WR.WORK_CENTER RESOURCE_WORK_CENTER, MAX(CP.ITEM) COMPONENT, MAX(CT.DESCRIPTION) COMPONENT_DESCRIPTION, MAX(C3.VALUE) TEXTURE, MAX(C4.VALUE) MAT_SPEC
FROM Z_SFC_DISPATCH SD
INNER JOIN SFC SC ON SC.SITE = SD.SITE AND SC.SFC = SD.SFC
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
INNER JOIN SHOP_ORDER SO ON SO.SITE = SD.SITE AND SO.SHOP_ORDER = SD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
@ -695,7 +696,8 @@
LEFT JOIN CUSTOM_FIELDS CC ON CC.HANDLE = IM.HANDLE AND CC.ATTRIBUTE = 'ACCESSORY_TYPE'
INNER JOIN OPERATION O ON O.SITE = SD.SITE AND O.OPERATION = SD.OPERATION AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = 'zh'
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SO.BOM_BO
INNER JOIN SFC_BOM SB ON SB.SFC_BO = SC.HANDLE
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SB.BOM_BO
LEFT JOIN ITEM CP ON CP.HANDLE = BC.COMPONENT_GBO
LEFT JOIN ITEM_T CT ON CT.ITEM_BO = CP.HANDLE AND CT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS C3 ON C3.HANDLE = CP.HANDLE AND C3.ATTRIBUTE = 'TEXTTURE'

@ -88,24 +88,24 @@ public class InterfaceServiceImpl implements InterfaceService {
throw BusinessException.build("物料状态可维护的值为201(可下达)、202(冻结)、203(作废)、204(保留)、205(新建)");
}
String statusBo = HandleEnum.STATUS.getHandle(site, status);
//物料类型(FERT(已完成)/ROH(原始)/HALB(半成品)/KMAT(可配置)/INST(安装)/VERP(包装)/FHMI(生产资源/工具)/CSTM(自定义))
String itemType = itemSyncRequest.getITEM_TYPE();
if (!"FERT".equals(itemType) && !"ROH".equals(itemType) && !"HALB".equals(itemType)) {
throw BusinessException.build("物料类型可维护的值为FERT(已完成)、ROH(原始)、HALB(半成品)");
}
//采购类型(M(制造)/P(采购)/B(制造/采购))
String procurementType = itemSyncRequest.getPROCUREMENT_TYPE();
if (!"M".equals(procurementType) && !"P".equals(procurementType) && !"B".equals(procurementType)) {
throw BusinessException.build("采购类型可维护的值为M(制造)、P(采购)、B(制造/采购)");
/**
* Modify by Leon - 20210920
* -CAPP0502/03/06
*/
String itemType = null;
String procurementType = null;
if (item.startsWith("02") || item.startsWith("03") || item.startsWith("06")) {
itemType = "HALB";
procurementType = "B";
} else {
itemType = "ROH";
procurementType = "P";
}
//批次大小
String lotSize = itemSyncRequest.getLOT_SIZE();
lotSize = StringUtil.notBlank(lotSize) ? lotSize : "999999";
//装配时要收集的数据
String assyDataType = itemSyncRequest.getASSY_DATA_TYPE();
//库存接收数据类型
String invAssyDataType = itemSyncRequest.getINV_ASSY_DATA_TYPE();
//物料标准API
ItemConfigurationServiceInterface itemServiceInterFace = MEServices.create("com.sap.me.productdefinition", "ItemConfigurationService", site);

@ -323,7 +323,6 @@
<select id="findAllUser" resultMap="BaseResultMap">
SELECT USER_NAME, FULL_NAME
FROM Z_NWA_USER
WHERE SITE = #{site}
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.NwaUser">

@ -462,6 +462,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
String shopOrderBo = sfcServiceById.getShopOrderBo();
String shopOrder = StringUtil.trimHandle(shopOrderBo);
ZprodordconfStruIn struIn = new ZprodordconfStruIn();
workHour = workHour.setScale(3,RoundingMode.DOWN);
//生产订单
struIn.setAufnr(shopOrder);
//步骤标示

Loading…
Cancel
Save