Merge remote-tracking branch 'origin/master'

master
philip 4 years ago
commit be2cdf4c0b

@ -1258,7 +1258,16 @@
it.DESCRIPTION ITEM,zab.WORK_ORDER WORK_ORDER,zab.ITEM_NUMBER PROJECT, it.DESCRIPTION ITEM,zab.WORK_ORDER WORK_ORDER,zab.ITEM_NUMBER PROJECT,
LISTAGG(nct.DESCRIPTION , ',') WITHIN GROUP(ORDER BY zab.ABNORMAL_NO) NC, LISTAGG(nct.DESCRIPTION , ',') WITHIN GROUP(ORDER BY zab.ABNORMAL_NO) NC,
r.DESCRIPTION "RESOURCE",r2.DESCRIPTION WORKCENTER_LIN, r.DESCRIPTION "RESOURCE",r2.DESCRIPTION WORKCENTER_LIN,
zabd.ABNORMAL_METHOD METHOD CASE WHEN zabd.ABNORMAL_METHOD = 'X' THEN '线下换料'
WHEN zabd.ABNORMAL_METHOD = 'S' THEN '试装'
WHEN zabd.ABNORMAL_METHOD = 'R' THEN '让步放心'
WHEN zabd.ABNORMAL_METHOD = 'C' THEN '报废'
WHEN zabd.ABNORMAL_METHOD = 'P' THEN '配作'
WHEN zabd.ABNORMAL_METHOD = 'F' THEN '返修'
WHEN zabd.ABNORMAL_METHOD = 'FW' THEN '返修(外协)'
WHEN zabd.ABNORMAL_METHOD = 'FB' THEN '返修(不返回原工艺)'
ELSE ''
END ABNORMAL_METHOD,
FROM Z_ABNORMAL_BILL zab FROM Z_ABNORMAL_BILL zab
INNER JOIN ITEM i ON i.HANDLE = zab.ITEM_BO INNER JOIN ITEM i ON i.HANDLE = zab.ITEM_BO
LEFT JOIN RESRCE r ON r.RESRCE = zab.RESRCE AND r.SITE = zab.SITE LEFT JOIN RESRCE r ON r.RESRCE = zab.RESRCE AND r.SITE = zab.SITE

@ -271,6 +271,8 @@
WHEN zabd.ABNORMAL_METHOD = 'C' THEN '报废' WHEN zabd.ABNORMAL_METHOD = 'C' THEN '报废'
WHEN zabd.ABNORMAL_METHOD = 'P' THEN '配作' WHEN zabd.ABNORMAL_METHOD = 'P' THEN '配作'
WHEN zabd.ABNORMAL_METHOD = 'F' THEN '返修' WHEN zabd.ABNORMAL_METHOD = 'F' THEN '返修'
WHEN zabd.ABNORMAL_METHOD = 'FW' THEN '返修(外协)'
WHEN zabd.ABNORMAL_METHOD = 'FB' THEN '返修(不返回原工艺)'
ELSE '' ELSE ''
END ABNORMAL_METHOD,zabd.RESOLVE_REMARK RESOLVE_REMARK,zabd.RESOLVE_USER RESOLVE_USER, END ABNORMAL_METHOD,zabd.RESOLVE_REMARK RESOLVE_REMARK,zabd.RESOLVE_USER RESOLVE_USER,
zabd.CLOSED_DATE_TIME CLOSED_DATE_TIME,zab.NC_QTY NC_QTY,zab.PB_QTY PB_QTY, zabd.CLOSED_DATE_TIME CLOSED_DATE_TIME,zab.NC_QTY NC_QTY,zab.PB_QTY PB_QTY,
@ -368,6 +370,8 @@
WHEN zabd.ABNORMAL_METHOD = 'C' THEN '报废' WHEN zabd.ABNORMAL_METHOD = 'C' THEN '报废'
WHEN zabd.ABNORMAL_METHOD = 'P' THEN '配作' WHEN zabd.ABNORMAL_METHOD = 'P' THEN '配作'
WHEN zabd.ABNORMAL_METHOD = 'F' THEN '返修' WHEN zabd.ABNORMAL_METHOD = 'F' THEN '返修'
WHEN zabd.ABNORMAL_METHOD = 'FW' THEN '返修(外协)'
WHEN zabd.ABNORMAL_METHOD = 'FB' THEN '返修(不返回原工艺)'
ELSE '' 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 , znu3.FULL_NAME RESOLVE_USER,zabd.CLOSED_DATE_TIME CANCEL_DATE_TIME ,

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

@ -72,7 +72,7 @@ public class FileController {
//String newPath = new String(coderPath.getBytes("GBK"), FTPClient.DEFAULT_CONTROL_ENCODING); //String newPath = new String(coderPath.getBytes("GBK"), FTPClient.DEFAULT_CONTROL_ENCODING);
in = ftpClient.getFtp(path); in = ftpClient.getFtp(path);
if(null == in){ if(null == in){
in = ftpClient.getFtp(new String(path.getBytes("UTF-8"), FTPClient.DEFAULT_CONTROL_ENCODING)); in = ftpClient.getFtp(new String(path.getBytes("GBK"), FTPClient.DEFAULT_CONTROL_ENCODING));
} }
//本地测试 //本地测试

@ -312,6 +312,7 @@ public class CappFtpClient {
*/ */
public InputStream getFtp(String path) throws Exception { public InputStream getFtp(String path) throws Exception {
login(); login();
ftp.enterLocalPassiveMode();
InputStream in = ftp.retrieveFileStream(path); InputStream in = ftp.retrieveFileStream(path);
return in; return in;
} }

@ -18,7 +18,6 @@ import java.time.LocalDateTime;
@Component @Component
public class ActiveMQUtil { public class ActiveMQUtil {
@Autowired(required = false) @Autowired(required = false)
@Qualifier("mesJmsTemplate") @Qualifier("mesJmsTemplate")
private JmsMessagingTemplate mesJmsTemplate; private JmsMessagingTemplate mesJmsTemplate;
@ -34,8 +33,7 @@ public class ActiveMQUtil {
mesJmsTemplate.convertAndSend(queue, jsonObject.toString()); mesJmsTemplate.convertAndSend(queue, jsonObject.toString());
}catch (Exception ignored){ }catch (Exception ignored){
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
logger.info("消息发送失败。日期:" + now + "消息内容:"+text) ; logger.info("消息发送失败。日期:" + now + ",消息内容:"+text+",错误信息:"+ignored.getMessage());
// throw new BaseException("消息发送失败");
} }
} }
} }

@ -69,7 +69,7 @@ public class ItemWSClient {
//物料类型(FERT(已完成)/ROH(原始)/HALB(半成品)/KMAT(可配置)/INST(安装)/VERP(包装)/FHMI(生产资源/工具)/CSTM(自定义)) //物料类型(FERT(已完成)/ROH(原始)/HALB(半成品)/KMAT(可配置)/INST(安装)/VERP(包装)/FHMI(生产资源/工具)/CSTM(自定义))
String itemTypeDesc = jsonObject.getString("materialType"); String itemTypeDesc = jsonObject.getString("materialType");
if (!"已完成".equals(itemTypeDesc) && !"原始".equals(itemTypeDesc) && !"半成品".equals(itemTypeDesc)) { if (!"已完成".equals(itemTypeDesc) && !"原始".equals(itemTypeDesc) && !"半成品".equals(itemTypeDesc)) {
throw BusinessException.build("物料类型可维护的值为:FERT(已完成)ROH(原始)HALB(半成品)"); throw BusinessException.build("物料类型可维护的值为:已完成、原始、半成品");
} }
String itemType = "ROH"; String itemType = "ROH";
switch (itemTypeDesc) { switch (itemTypeDesc) {
@ -88,19 +88,19 @@ public class ItemWSClient {
//采购类型(M(制造)/P(采购)/B(制造/采购)) //采购类型(M(制造)/P(采购)/B(制造/采购))
String procurementTypeDesc = jsonObject.getString("itemType"); String procurementTypeDesc = jsonObject.getString("itemType");
if (!"M".equals(procurementTypeDesc) && !"P".equals(procurementTypeDesc) && !"B".equals(procurementTypeDesc)) { if (!"制造".equals(procurementTypeDesc) && !"采购".equals(procurementTypeDesc) && !"制造/采购".equals(procurementTypeDesc)) {
throw BusinessException.build("采购类型可维护的值为:M(制造)P(采购)B(制造/采购)"); throw BusinessException.build("采购类型可维护的值为:制造、采购、制造/采购");
} }
String procurementType = "P"; String procurementType = "P";
switch (procurementTypeDesc) { switch (procurementTypeDesc) {
case "采购": case "采购":
itemType = "P"; procurementType = "P";
break; break;
case "制造/采购": case "制造/采购":
itemType = "B"; procurementType = "B";
break; break;
case "制造": case "制造":
itemType = "M"; procurementType = "M";
break; break;
default: default:
break; break;
@ -146,7 +146,7 @@ public class ItemWSClient {
case "任意数字": case "任意数字":
itemConfiguration.setQuantityRestriction(QuantityRestriction.ANY_NUMBER); itemConfiguration.setQuantityRestriction(QuantityRestriction.ANY_NUMBER);
break; break;
case "数": case "数":
itemConfiguration.setQuantityRestriction(QuantityRestriction.WHOLE_NUMBER); itemConfiguration.setQuantityRestriction(QuantityRestriction.WHOLE_NUMBER);
break; break;
default: default:

@ -62,10 +62,9 @@ public class ItemHandler extends BaseHandler {
jsonObject.put("site", site); jsonObject.put("site", site);
ItemFullConfiguration itemFull = ItemWSClient.find(jsonObject); ItemFullConfiguration itemFull = ItemWSClient.find(jsonObject);
if (itemFull == null) { if (itemFull == null) {
resultMessage = "物料主数据不存在"; resultMessage = ItemWSClient.insert(jsonObject);
} else { } else {
ItemWSClient.update(jsonObject, itemFull); resultMessage = ItemWSClient.update(jsonObject, itemFull);
return 1;
} }
if (resultMessage != null) { if (resultMessage != null) {
@ -74,6 +73,8 @@ public class ItemHandler extends BaseHandler {
buffer.append("第" + index + "行:" + I18nUtil.getI18nText("MaterData.import.update.fail", params) + "\n"); buffer.append("第" + index + "行:" + I18nUtil.getI18nText("MaterData.import.update.fail", params) + "\n");
return 0; return 0;
} }
return 1;
} }
return 0; return 0;

@ -20,12 +20,12 @@ public class MasterObjectDefine {
cvsHeadsMapping = new HashMap<>(); cvsHeadsMapping = new HashMap<>();
cvsHeadsMapping.put("seqNum","序号"); cvsHeadsMapping.put("seqNum","序号");
cvsHeadsMapping.put("item", "*物料编码"); cvsHeadsMapping.put("item", "物料编码");
cvsHeadsMapping.put("itemDesc", "物料描述(中文)"); cvsHeadsMapping.put("itemDesc", "物料描述(中文)");
cvsHeadsMapping.put("materialType", "物料类型"); cvsHeadsMapping.put("materialType", "物料类型(原始|半成品|已完成)");
cvsHeadsMapping.put("itemType", "采购类型"); cvsHeadsMapping.put("itemType", "采购类型(采购|制造/采购|制造)");
cvsHeadsMapping.put("lotSize","批次大小"); cvsHeadsMapping.put("lotSize","批次大小");
cvsHeadsMapping.put("qtyRestriction","数量限制"); cvsHeadsMapping.put("qtyRestriction","数量限制(仅1.0|任意数字|整数)");
cvsHeadsMapping.put("unit","计量单位"); cvsHeadsMapping.put("unit","计量单位");
break; break;

Loading…
Cancel
Save