Commit 021cee7a by liuyang

2024-05-08 优化工序单价

parent 4cf786de
...@@ -146,14 +146,17 @@ public enum DdynamicEnum { ...@@ -146,14 +146,17 @@ public enum DdynamicEnum {
* 用途:工序设计下拉框 * 用途:工序设计下拉框
* 编写:ly * 编写:ly
*/ */
COMPANY_BOX_BLOCK_ID("companyBox_block_id","orgEname","orgCname","HGSJ001.queryCompany"), COMPANY_BOX_BLOCK_ID("companyBox_block_id","orgEname","orgCname","HGSJ001.queryCompany",
new HashMap<String,Object>(){{
put("orgType", OrgTypeEnum.COMPANY.getCode());
}}),
/** /**
* 模块:工序编码 * 模块:工序编码
* 用途:工序编码下拉框 * 用途:工序编码下拉框
* 编写:ly * 编写:ly
*/ */
PROCESS_CODE_BLOCK_ID("processCode_block_id","processCode","processName","factoryCode","factoryName","HGSJ001.queryProcessCode") PROCESS_CODE_BLOCK_ID("processCode_block_id","processCode","processName","factoryCode","factoryName","unit","HGSJ001.queryProcessCode")
; ;
......
...@@ -35,8 +35,7 @@ public class ServiceHGSJ001 extends ServiceEPBase { ...@@ -35,8 +35,7 @@ public class ServiceHGSJ001 extends ServiceEPBase {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ001.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ001.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGSJ001.QUERY, new HGSJ001()); inInfo = super.query(inInfo, HGSJ001.QUERY, new HGSJ001());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.USER_BLOCK_ID), Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.USER_BLOCK_ID),null
new HashMap<String,Object>(){{put("orgType", OrgTypeEnum.COMPANY.getCode());}}
); );
return inInfo; return inInfo;
} }
......
...@@ -34,10 +34,7 @@ public class ServiceHGSJ002 extends ServiceEPBase { ...@@ -34,10 +34,7 @@ public class ServiceHGSJ002 extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGSJ002.QUERY, new HGSJ002()); inInfo = super.query(inInfo, HGSJ002.QUERY, new HGSJ002());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),null);
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),
new HashMap<String,Object>(){{put("orgType", OrgTypeEnum.COMPANY.getCode());}}
);
return inInfo; return inInfo;
} }
......
...@@ -35,10 +35,9 @@ public class ServiceHGSJ002A extends ServiceEPBase { ...@@ -35,10 +35,9 @@ public class ServiceHGSJ002A extends ServiceEPBase {
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_CODE,inInfo.get("inqu_status-0-flowCode")); //inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_CODE,inInfo.get("inqu_status-0-flowCode"));
String factoryCode = inInfo.getCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGSJ002A.FIELD_FACTORY_CODE).toString(); String factoryCode = inInfo.getCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGSJ002A.FIELD_FACTORY_CODE).toString();
inInfo = super.query(inInfo, HGSJ002A.QUERY, new HGSJ002A()); inInfo = super.query(inInfo, HGSJ002A.QUERY, new HGSJ002A());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),null);
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID), CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID),
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put("orgType", OrgTypeEnum.COMPANY.getCode());
put(HGSJ002A.FIELD_FACTORY_CODE,factoryCode); put(HGSJ002A.FIELD_FACTORY_CODE,factoryCode);
put(HGSJ002A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}} put(HGSJ002A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
); );
......
...@@ -34,11 +34,9 @@ public class ServiceHGSJ003 extends ServiceEPBase { ...@@ -34,11 +34,9 @@ public class ServiceHGSJ003 extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ003.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ003.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGSJ003.QUERY, new HGSJ003()); inInfo = super.query(inInfo, HGSJ003.QUERY, new HGSJ003());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),null);
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID), CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID),
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{put(HGSJ003.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
put("orgType", OrgTypeEnum.COMPANY.getCode());
put(HGSJ003.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
); );
return inInfo; return inInfo;
} }
......
...@@ -278,19 +278,24 @@ ...@@ -278,19 +278,24 @@
PROCESS_CODE as "processCode", <!-- 工序编码 --> PROCESS_CODE as "processCode", <!-- 工序编码 -->
CONCAT('[',FACTORY_NAME,']',PROCESS_NAME) as "processName", <!-- 工序名称 --> CONCAT('[',FACTORY_NAME,']',PROCESS_NAME) as "processName", <!-- 工序名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 厂区名称 --> FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
UNIT AS "unit"
FROM ${hggpSchema}.HGGY001 WHERE 1=1 FROM ${hggpSchema}.HGGY001 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
group by PROCESS_CODE,PROCESS_NAME,FACTORY_CODE,FACTORY_NAME group by PROCESS_CODE,PROCESS_NAME,FACTORY_CODE,FACTORY_NAME,UNIT
</select> </select>
<!--查询用户所在的公司-->
<select id="queryCompany" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryCompany" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select distinct select
ORG_ENAME as "orgEname", a.ORG_ENAME as "orgEname",
ORG_CNAME as "orgCname" a.ORG_CNAME as "orgCname"
from iplat_hggp.txsog01 from iplat_hggp.txsog01 a
where ACCOUNT_CODE = #accountCode# and ORG_TYPE in (#orgType#) left join iplat_hggp.txsog02 b on a.ORG_ID = b.ORG_ID
where
a.ACCOUNT_CODE = #accountCode#
and a.ORG_TYPE = #orgType#
<!--and b.USER_ID = #userId#-->
</select> </select>
</sqlMap> </sqlMap>
...@@ -67,6 +67,7 @@ $(function (){ ...@@ -67,6 +67,7 @@ $(function (){
for (let i = 0; i < processCodes.length; i++) { for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) { if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField'].split("]")[1]; dataItem['processName'] = processCodes[i]['textField'].split("]")[1];
dataItem['unit'] = processCodes[i]['param3Field']
return processCodes[i]['textField'].split("]")[1]; return processCodes[i]['textField'].split("]")[1];
} }
} }
...@@ -110,6 +111,8 @@ $(function (){ ...@@ -110,6 +111,8 @@ $(function (){
if (e.items[0].factoryCode.length===0){ if (e.items[0].factoryCode.length===0){
loadChange(grid,e,"factoryCode"); loadChange(grid,e,"factoryCode");
} }
loadChange(grid,e,"unit");
loadChange(grid,e,"processClass");
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment