refactor(taikai2312): 优化项目设置和代码结构
- 在.project文件中添加filteredResources配置,过滤掉不必要的文件和目录 - 移除AfterApprovingSynchronizeRuleMES类中的冗余代码 -简化PmoResource类中的方法逻辑,提高代码可读性
This commit is contained in:
parent
0f9535de9a
commit
7ae5b5841d
|
@ -111,10 +111,7 @@ public class PmoResource extends AbstractNCCRestResource {
|
|||
if (paramMap == null || !paramMap.containsKey("vdef8")) {
|
||||
return ResultMessageUtil.exceptionToJSON("传入数据异常,参数要包含vdef8信息", APIErrCodeEnum.BUSINESSEXCCODE.getCode());
|
||||
}
|
||||
// 获取vdef8数组
|
||||
List<String> vdef8List = (List<String>) paramMap.get("vdef8");
|
||||
|
||||
// 获取limit参数
|
||||
Integer limit = null;
|
||||
if (paramMap.containsKey("limit")) {
|
||||
Object limitObj = paramMap.get("limit");
|
||||
|
@ -122,7 +119,6 @@ public class PmoResource extends AbstractNCCRestResource {
|
|||
limit = ((Number) limitObj).intValue();
|
||||
}
|
||||
}
|
||||
|
||||
String baseSql;
|
||||
if (MMCollectionUtil.isEmpty(vdef8List)) {
|
||||
// 如果vdef8List为空,查询所有数据
|
||||
|
@ -147,10 +143,7 @@ public class PmoResource extends AbstractNCCRestResource {
|
|||
} else {
|
||||
sql = baseSql;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> rows = (List<Map<String, Object>>) BASE_DAO.executeQuery(sql, new MapListProcessor());
|
||||
|
||||
return ResultMessageUtil.toJSON(rows, "查询生产订单信息成功");
|
||||
|
||||
} catch (DAOException e) {
|
||||
|
|
|
@ -184,8 +184,6 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<SaleOrderVO> {
|
|||
detailItem.put("demandDate", dreceivedate1 != null ? dreceivedate1.toString().substring(0, 10) : null);
|
||||
UFDate dsenddate1 = body.getDsenddate();
|
||||
detailItem.put("deliveryDate", dsenddate1 != null ? dsenddate1.toString().substring(0, 10) : null);
|
||||
// 其他非必填字段设为null
|
||||
detailItem.put("productNum", null);
|
||||
// 传递电缆公司的组织编码
|
||||
detailItem.put("factoryId", transferCodeByPk(SalesOrgVO.getDefaultTableName(), SalesOrgVO.CODE, SalesOrgVO.PK_SALESORG, head.getPk_org()));
|
||||
detailItem.put("customMtId", null);
|
||||
|
|
Loading…
Reference in New Issue