Commit 4636edbf by yukang

Merge remote-tracking branch 'origin/dev' into dev

parents 3f860ffa 7e4d4252
package com.baosight.hggp.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author wwl
* @version 1.0 2024/5/21
*/
public enum AssignStatusEnum {
UNASSIGN(0,"未派工"),
PARTIAL_ASSIGN(1,"部分派工"),
ASSIGNED(2,"已派工");
private Integer code;
private String value;
AssignStatusEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public static AssignStatusEnum getEnumByCode(Integer code){
for (AssignStatusEnum en : AssignStatusEnum.values()){
if(code.compareTo(en.code)==0){
return en;
}
}
return null;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
...@@ -60,6 +60,13 @@ public enum DdynamicEnum { ...@@ -60,6 +60,13 @@ public enum DdynamicEnum {
/** /**
* 模块:存货类型 * 模块:存货类型
* 用途:存货类型下拉框 (不默认状态)
* 编写:
*/
INVENT_TYPE_BOX_BLOCK_ID("invent_type_box_block_id","inventType","inventTypeName","status","HGPZ004.queryInventTypeBox"),
/**
* 模块:存货类型
* 用途:父级存货类型下拉框 * 用途:父级存货类型下拉框
* 编写: * 编写:
*/ */
...@@ -74,6 +81,13 @@ public enum DdynamicEnum { ...@@ -74,6 +81,13 @@ public enum DdynamicEnum {
/** /**
* 模块:存货档案 * 模块:存货档案
* 用途:存货档案下拉框 (不默认状态)
* 编写:
*/
INVENT_RECORD_BOX_BLOCK_ID("invent_record_box_block_id","inventCode","inventName","status","HGPZ005.queryInventCodeBox"),
/**
* 模块:存货档案
* 用途:存货档案下拉框,带id名称等信息 * 用途:存货档案下拉框,带id名称等信息
* 编写: * 编写:
*/ */
...@@ -85,6 +99,15 @@ public enum DdynamicEnum { ...@@ -85,6 +99,15 @@ public enum DdynamicEnum {
*/ */
INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "length", "width", "thick", INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"coefficient", "HGPZ005.queryComboBoxAll"), "coefficient", "HGPZ005.queryComboBoxAll"),
/**
* 模块:存货档案(ALL 不默认状态)
* 用途:存货档案下拉框
* 编写:
*/
INVENT_ALL_BOX_BLOCK_ID("invent_all_box_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"coefficient","status", "HGPZ005.queryInventBoxAll"),
/** /**
* 模块:规格 * 模块:规格
* 用途:存货档案下拉框 * 用途:存货档案下拉框
...@@ -105,7 +128,7 @@ public enum DdynamicEnum { ...@@ -105,7 +128,7 @@ public enum DdynamicEnum {
* 用途:仓库类型下拉框 * 用途:仓库类型下拉框
* 编写: * 编写:
*/ */
WH_TYPE_BLOCK_ID("wh_type_block_id", "whType", "whTypeName", "HGPZ006.queryComboBox"), WH_TYPE_BLOCK_ID("wh_type_block_id", "whType", "whTypeName","status", "HGPZ006.queryComboBox"),
/** /**
* 模块:仓库档案 * 模块:仓库档案
...@@ -115,6 +138,13 @@ public enum DdynamicEnum { ...@@ -115,6 +138,13 @@ public enum DdynamicEnum {
WH_RECORD_BLOCK_ID("wh_record_block_id", "whCode", "whName", "HGPZ007.queryComboBox"), WH_RECORD_BLOCK_ID("wh_record_block_id", "whCode", "whName", "HGPZ007.queryComboBox"),
/** /**
* 模块:仓库档案
* 用途:仓库档案下拉框 不默认状态
* 编写:
*/
WH_CODE_BLOCK_ID("wh_code_block_id", "whCode", "whName","status", "HGPZ007.queryWhCodeBox"),
/**
* 模块:厂区管理 * 模块:厂区管理
* 用途:厂区管理下拉框 * 用途:厂区管理下拉框
* 编写:songx * 编写:songx
...@@ -374,6 +404,21 @@ public enum DdynamicEnum { ...@@ -374,6 +404,21 @@ public enum DdynamicEnum {
} }
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4, DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6, String param7,String dbSource) {
this.blockId = blockId;
this.value = value;
this.text = text;
this.param1 = param1;
this.param2 = param2;
this.param3 = param3;
this.param4 = param4;
this.param5 = param5;
this.param6 = param6;
this.param7 =param7;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String param9,String dbSource) { String param5, String param6,String param7,String param8,String param9,String dbSource) {
this.blockId = blockId; this.blockId = blockId;
this.value = value; this.value = value;
......
package com.baosight.hggp.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/5/21
*/
public enum RunStatusEnum {
KJ(1,"开机"),
TJ(0,"停机");
private Integer code;
private String value;
RunStatusEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public static EiBlock generatorEiBlock() {
EiBlock block = new EiBlock("run_status_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{
put(HGConstants.TEXT_FIELD, KJ.value);
put(HGConstants.VALUE_FIELD, KJ.code);
}});
add(new HashMap<String, Object>() {{
put(HGConstants.TEXT_FIELD, TJ.value);
put(HGConstants.VALUE_FIELD, TJ.code);
}});
}};
block.setRows(rows);
return block;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
...@@ -68,7 +68,7 @@ public class HGConstant { ...@@ -68,7 +68,7 @@ public class HGConstant {
//生产计划单 //生产计划单
public static final String HGSC005_PLAN_CODE = "HGSC005_PLAN_CODE"; public static final String HGSC005_PLAN_CODE = "HGSC005_PLAN_CODE";
//生产订单 //生产订单
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO"; public static final String HPSC006_ORDER_CODE = "HPSC006_ORDER_CODE";
//生产任务订单 //生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO"; public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号 //售后维修单号
......
...@@ -82,6 +82,7 @@ public class ServiceHGCW004 extends ServiceBase { ...@@ -82,6 +82,7 @@ public class ServiceHGCW004 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW004.setCompanyCode(userVO.getUsercode()); HGCW004.setCompanyCode(userVO.getUsercode());
HGCW004.setCompanyName(userVO.getUsername()); HGCW004.setCompanyName(userVO.getUsername());
HGCW004.setContractName(userVO.getUsername());
if (HGCW004.getId() == null || HGCW004.getId() == 0) { if (HGCW004.getId() == null || HGCW004.getId() == 0) {
this.add(HGCW004); this.add(HGCW004);
} else { } else {
......
...@@ -48,7 +48,7 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -48,7 +48,7 @@ public class ServiceHGPZ005 extends ServiceBase {
@OperationLogAnnotation(operModul = "存货档案", operType = "查询", operDesc = "初始化") @OperationLogAnnotation(operModul = "存货档案", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ005().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ005().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -248,6 +248,24 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -248,6 +248,24 @@ public class ServiceHGPZ005 extends ServiceBase {
} }
/** /**
* 下拉框 (不默认状态)
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "下拉框(不默认状态)")
public EiInfo queryInventCodeBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
/**
* 下拉框 * 下拉框
* *
* @param inInfo * @param inInfo
...@@ -265,6 +283,24 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -265,6 +283,24 @@ public class ServiceHGPZ005 extends ServiceBase {
return inInfo; return inInfo;
} }
/**
* 下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "下拉框(不默认状态)")
public EiInfo queryInventBoxAll(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_ALL_BOX_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "存货档案",operType = "导入",operDesc = "导入操作") @OperationLogAnnotation(operModul = "存货档案",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) { public EiInfo importDate(EiInfo inInfo) {
try { try {
......
...@@ -230,4 +230,22 @@ public class ServiceHGPZ007 extends ServiceBase { ...@@ -230,4 +230,22 @@ public class ServiceHGPZ007 extends ServiceBase {
return inInfo; return inInfo;
} }
/**
* 下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询",operDesc = "下拉框不默认状态")
public EiInfo queryWhCodeBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.WH_CODE_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
} }
...@@ -45,8 +45,8 @@ public class ServiceHGPZ010 extends ServiceBase { ...@@ -45,8 +45,8 @@ public class ServiceHGPZ010 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_TYPE_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_TYPE_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_CODE_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ010().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -221,6 +221,26 @@ ...@@ -221,6 +221,26 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryInventTypeBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_TYPE as "inventType",
INVENT_TYPE_NAME as "inventTypeName",
STATUS AS "status"
FROM ${hggpSchema}.HGPZ004
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_TYPE
</select>
<select id="queryComboBox" parameterClass="java.util.HashMap" <select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
......
...@@ -318,6 +318,26 @@ ...@@ -318,6 +318,26 @@
ORDER BY INVENT_CODE ORDER BY INVENT_CODE
</select> </select>
<select id="queryInventCodeBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName",
STATUS as "status"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
<select id="queryProductComboBox" parameterClass="java.util.HashMap" <select id="queryProductComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
...@@ -359,6 +379,23 @@ ...@@ -359,6 +379,23 @@
<include refid="condition"/> <include refid="condition"/>
ORDER BY ID ORDER BY ID
</select> </select>
<!---->
<select id="queryInventBoxAll" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
ID AS "id",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
LENGTH AS "length" , <!-- 长 -->
WIDTH AS "width" , <!-- 宽 -->
THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient" , <!-- 系数 -->
MATERIAL AS "material" , <!-- 材质 -->
UNIT AS "unit", <!-- 单位 -->
STATUS AS "status"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
<include refid="condition"/>
ORDER BY ID
</select>
<!-- 规格下拉框(无ID) --> <!-- 规格下拉框(无ID) -->
<select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......
...@@ -205,16 +205,19 @@ ...@@ -205,16 +205,19 @@
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
WH_TYPE as "whType", WH_TYPE as "whType",
WH_TYPE_NAME as "whTypeName" WH_TYPE_NAME as "whTypeName",
STATUS as "status"
FROM ${hggpSchema}.HGPZ006 FROM ${hggpSchema}.HGPZ006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode# ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whType"> <isNotEmpty prepend=" AND " property="whType">
WH_TYPE = #whType# WH_TYPE = #whType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY WH_TYPE ORDER BY WH_TYPE
</select> </select>
......
...@@ -238,4 +238,24 @@ ...@@ -238,4 +238,24 @@
ORDER BY WH_CODE ORDER BY WH_CODE
</select> </select>
<select id="queryWhCodeBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
WH_CODE as "whCode",
WH_NAME as "whName",
STATUS as "status"
FROM ${hggpSchema}.HGPZ007
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whType">
WH_TYPE = #whType#
</isNotEmpty>
ORDER BY WH_CODE
</select>
</sqlMap> </sqlMap>
package com.baosight.hggp.hg.sb.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.RunStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.sb.domain.HGSB008;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/5/20
*/
public class ServiceHGSB008 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSB008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo,HGSB008.QUERY,new HGSB008());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.DEVICE_CODE_BOX_BLOCK_ID),null
);
inInfo.setBlock(RunStatusEnum.generatorEiBlock());
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String logDate = inInfo.getCellStr(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGSB008.FIELD_LOG_DATE);
if (StringUtils.isNotEmpty(logDate)) {
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGSB008.FIELD_LOG_DATE, DateUtils.formatShort(logDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSB008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGSB008.QUERY,new HGSB008());
}
}
...@@ -94,6 +94,8 @@ public class HGSC004A extends DaoEPBase { ...@@ -94,6 +94,8 @@ public class HGSC004A extends DaoEPBase {
public static final String BATCH_CHANGE_TYPE = "HGSC004A.changeType"; public static final String BATCH_CHANGE_TYPE = "HGSC004A.changeType";
public static final String QUERY_ALL = "HGSC004A.queryAll"; public static final String QUERY_ALL = "HGSC004A.queryAll";
public static final String UPDATE_PRODUCT_STATUS = "HGSC004A.updateProductStatus"; public static final String UPDATE_PRODUCT_STATUS = "HGSC004A.updateProductStatus";
public static final String MAX_ID = "HGSC004A.maxId";
public static final String QUERY_TECHFLOW_ID_BY_PRODUCTID = "HGSC004A.queryTechFlowIdByProductId";
......
...@@ -113,7 +113,7 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -113,7 +113,7 @@ public class ServiceHGSC004A extends ServiceBase {
//主表信息,用于取值 //主表信息,用于取值
Long materialId = Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSC004A.FIELD_material_id)); Long materialId = Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSC004A.FIELD_material_id));
HGSC004 hgsc004 = (HGSC004) super.dao.get(HGSC004.QUERY,HGSC004A.FIELD_id,materialId); HGSC004 hgsc004 = (HGSC004) super.dao.get(HGSC004.QUERY_BY_ID,HGSC004A.FIELD_id,materialId);
if(Objects.nonNull(hgsc004)){ if(Objects.nonNull(hgsc004)){
hgsc004a.setCompanyCode(hgsc004.getCompanyCode()); hgsc004a.setCompanyCode(hgsc004.getCompanyCode());
hgsc004a.setCompanyName(hgsc004.getCompanyName()); hgsc004a.setCompanyName(hgsc004.getCompanyName());
...@@ -130,6 +130,8 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -130,6 +130,8 @@ public class ServiceHGSC004A extends ServiceBase {
hgsc004a.setLeaf(1); hgsc004a.setLeaf(1);
} }
this.checkSaveData(hgsc004a,hgsc003); this.checkSaveData(hgsc004a,hgsc003);
//蓝图信息,用于蓝图状态校验
HGSC004A flowHGSC004A = (HGSC004A) super.dao.get(HGSC004A.QUERY_TECHFLOW_ID_BY_PRODUCTID,HGSC004A.FIELD_product_id,hgsc004a.getProductId());
if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()!=0){ if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()!=0){
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){ if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
hgsc004a.setChangeType(HGConstant.ChangeType.TH); hgsc004a.setChangeType(HGConstant.ChangeType.TH);
...@@ -140,6 +142,8 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -140,6 +142,8 @@ public class ServiceHGSC004A extends ServiceBase {
BeanUtil.copyProperties(hgsc004a,hgsc005a,"id","productType"); BeanUtil.copyProperties(hgsc004a,hgsc005a,"id","productType");
hgsc005a.setMatDetailId(hgsc004a.getId()); hgsc005a.setMatDetailId(hgsc004a.getId());
hgsc005a.setMatId(hgsc004.getId()); hgsc005a.setMatId(hgsc004.getId());
hgsc005a.setTechFlowId(flowHGSC004A.getTechFlowId());
hgsc005a.setFinishDate(hgsc004.getFinishDate());
if(hgsc004a.getLv().intValue() == 3){ if(hgsc004a.getLv().intValue() == 3){
hgsc005a.setProductType(ProductTypeEnum.STRUCT.getCode()); hgsc005a.setProductType(ProductTypeEnum.STRUCT.getCode());
}else{ }else{
...@@ -147,16 +151,22 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -147,16 +151,22 @@ public class ServiceHGSC004A extends ServiceBase {
} }
HGSCTools.THGSC005A.update(hgsc005a); HGSCTools.THGSC005A.update(hgsc005a);
}else { }else {
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){ if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
hgsc004a.setChangeType(HGConstant.ChangeType.ZJ); hgsc004a.setChangeType(HGConstant.ChangeType.ZJ);
} }
hgsc004a.setProductStatus(HGConstant.ProductStatus.WTJ); hgsc004a.setProductStatus(HGConstant.ProductStatus.WTJ);
Map<String,Object> mapA = new HashMap<>();
Long maxID = (Long) dao.query(HGSC004A.MAX_ID,mapA, 0, -999999).get(0);
hgsc004a.setId(maxID+1);
DaoUtils.insert(HGSC004A.INSERT, hgsc004a); DaoUtils.insert(HGSC004A.INSERT, hgsc004a);
//子表 //子表
HGSC005A hgsc005a = new HGSC005A(); HGSC005A hgsc005a = new HGSC005A();
BeanUtil.copyProperties(hgsc004a,hgsc005a,"id","productType"); BeanUtil.copyProperties(hgsc004a,hgsc005a,"id","productType");
hgsc005a.setMatDetailId(hgsc004a.getId()); hgsc005a.setMatDetailId(hgsc004a.getId());
hgsc005a.setMatId(hgsc004.getId()); hgsc005a.setMatId(hgsc004.getId());
hgsc005a.setTechFlowId(flowHGSC004A.getTechFlowId());
hgsc005a.setFinishDate(flowHGSC004A.getFinishDate());
if(hgsc004a.getLv().intValue() == 3){ if(hgsc004a.getLv().intValue() == 3){
hgsc005a.setProductType(ProductTypeEnum.STRUCT.getCode()); hgsc005a.setProductType(ProductTypeEnum.STRUCT.getCode());
}else{ }else{
...@@ -246,7 +256,7 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -246,7 +256,7 @@ public class ServiceHGSC004A extends ServiceBase {
hgsc004a.fromMap(map); hgsc004a.fromMap(map);
DaoUtils.update(HGSC004A.UPDATE_PRODUCT_STATUS, hgsc004a); DaoUtils.update(HGSC004A.UPDATE_PRODUCT_STATUS, hgsc004a);
} }
HGSC004 hgsc004 = (HGSC004) super.dao.get(HGSC004.QUERY_BY_ID,HGSC001.FIELD_id,hgsc004a.getMaterialId()); HGSC004 hgsc004 = (HGSC004) super.dao.get(HGSC004.QUERY_BY_ID,HGSC004.FIELD_id,hgsc004a.getMaterialId());
if(Objects.nonNull(hgsc004)){ if(Objects.nonNull(hgsc004)){
Map<String,Object> mapA = new HashMap<>(); Map<String,Object> mapA = new HashMap<>();
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.EDTools;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Author wwl
* @Date 2024/5/6 19:48
*/
public class ServiceHGSC004B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC099().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
List<Map<String, Object>> EDCM01List = EDTools.EdCm01.list("hggp.sc.bizType");
if(!CollectionUtils.isEmpty(EDCM01List)){
List<String> bizTypes = new ArrayList<>();
for(Map<String, Object> map : EDCM01List){
bizTypes.add(map.get("itemCode").toString());
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "bizTypes",bizTypes);
}
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGSC099.queryRun", new HGSC099());
} else {
inInfo = super.query(inInfo, "HGSC099.queryDev", new HGSC099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGSC099 hgsc099 = new HGSC099();
hgsc099.fromMap(resultRows.get(i));
DaoUtils.insert(HGSC099.INSERT, hgsc099);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGSC099 hgsc099 = new HGSC099();
hgsc099.fromMap(resultRows.get(i));
DaoUtils.update(HGSC099.DELETE, hgsc099);
if (!hgsc099.getDocId().isEmpty()) {
this.delectDoc(hgsc099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
*
*/
public class ServiceHGSC004C extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
/**
* 附件上传.
*/
public EiInfo form(EiInfo inInfo) {
return inInfo;
}
}
...@@ -62,7 +62,8 @@ public class ServiceHGSC005 extends ServiceBase { ...@@ -62,7 +62,8 @@ public class ServiceHGSC005 extends ServiceBase {
this.checkCommitDate(hgsc005AList); this.checkCommitDate(hgsc005AList);
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC005.FIELD_id); List<Long> ids = ObjectUtils.listKey(resultRows, HGSC005.FIELD_id);
DaoUtils.update(HGSC005.BATCH_COMMIT, new HashMap<String,Object>(){{put("ids",ids);}}); DaoUtils.update(HGSC005.BATCH_COMMIT, new HashMap<String,Object>(){{put("ids",ids);}});
//TODO 生成生产订单 //生成生产订单
HGSCTools.THGSC006.generatorOrder(MapUtils.toDaoEPBase(inInfo,HGSC005.class), hgsc005AList);
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.sc.domain.HGSC006;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author wwl
* @Date 2024/5/6 19:48
*/
public class ServiceHGSC006 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产订单", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC006.QUERY, new HGSC006());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "生产订单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC006.QUERY, new HGSC006());
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.domain.HGSC006A;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
* @Author wwl
* @Date 2024/5/6 19:48
*/
public class ServiceHGSC006A extends ServiceBase {
@OperationLogAnnotation(operModul = "生产订单详情", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC006A.FIELD_order_code);
inInfo = super.query(inInfo, HGSC006A.QUERY, new HGSC006A());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "生产订单详情", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A());
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -206,7 +206,22 @@ ...@@ -206,7 +206,22 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
</dynamic> </dynamic>
</select>
<select id="queryTechFlowIdByProductId" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A">
SELECT
b.flow_id as "techFlowId"
FROM ${hggpSchema}.hgpz005 b
WHERE 1=1
<isNotEmpty prepend=" AND " property="productId">
b.id = #productId#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select> </select>
...@@ -346,6 +361,11 @@ ...@@ -346,6 +361,11 @@
ORDER BY CREATED_TIME DESC ORDER BY CREATED_TIME DESC
</select> </select>
<select id="maxId" resultClass="long">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC004A
</select>
<delete id="batchDelete"> <delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGSC004A WHERE DELETE FROM ${hggpSchema}.HGSC004A WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-21 12:09:46
Version : 1.0
schema : hggp
tableName : HGSC006
id BIGINT NOT NULL primarykey,
plan_id BIGINT NOT NULL,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
proj_code VARCHAR,
proj_name VARCHAR,
order_code VARCHAR,
assign_status TINYINT,
account_code VARCHAR NOT NULL,
dep_code VARCHAR,
dep_name VARCHAR,
created_by VARCHAR,
created_name VARCHAR,
created_time VARCHAR,
updated_by VARCHAR,
updated_name VARCHAR,
updated_time VARCHAR
-->
<sqlMap namespace="HGSC006">
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planId">
plan_id = #planId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name like ('%projName%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderCode">
order_code like ('%orderCode%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignStatus">
assign_status = #assignStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC006">
SELECT
id as "id",
mat_id as "matId", <!-- 物料清单ID -->
plan_id as "planId", <!-- 生产计划ID -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
order_code as "orderCode", <!-- 订单编码 -->
assign_status as "assignStatus", <!-- 派工状态 0:未派工;1:部分派工;2:已派工 -->
account_code as "accountCode", <!-- 帐套 -->
dep_code as "depCode", <!-- 部门编码 -->
dep_name as "depName", <!-- 部门名称 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC006 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
id asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC006 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planId">
plan_id = #planId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderCode">
order_code = #orderCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignStatus">
assign_status = #assignStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC006 (id,
mat_id, <!-- 物料清单ID -->
plan_id, <!-- 生产计划ID -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
proj_code, <!-- 项目编码 -->
proj_name, <!-- 项目名称 -->
order_code, <!-- 订单编码 -->
assign_status, <!-- 派工状态 0:未派工;1:部分派工;2:已派工 -->
account_code, <!-- 帐套 -->
dep_code, <!-- 部门编码 -->
dep_name, <!-- 部门名称 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #matId#, #planId#, #companyCode#, #companyName#, #projCode#, #projName#, #orderCode#, #assignStatus#, #accountCode#, #depCode#, #depName#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC006 WHERE
id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC006
SET
mat_id = #matId#, <!-- 物料清单ID -->
plan_id = #planId#, <!-- 生产计划ID -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
order_code = #orderCode#, <!-- 订单编码 -->
assign_status = #assignStatus#, <!-- 派工状态 0:未派工;1:部分派工;2:已派工 -->
account_code = #accountCode#, <!-- 帐套 -->
dep_code = #depCode#, <!-- 部门编码 -->
dep_name = #depName#, <!-- 部门名称 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE
id = #id#
</update>
</sqlMap>
...@@ -72,6 +72,9 @@ ...@@ -72,6 +72,9 @@
<isNotEmpty prepend=" AND " property="matId"> <isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId# A.MAT_ID = #matId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="bizTypes">
A.BIZ_TYPE IN <iterate close=")" open="(" conjunction="," property="bizTypes">#bizTypes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId"> <isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId# A.DOC_ID = #docId#
</isNotEmpty> </isNotEmpty>
......
package com.baosight.hggp.hg.sc.tools; package com.baosight.hggp.hg.sc.tools;
import com.baosight.hggp.common.AssignStatusEnum;
import com.baosight.hggp.common.ComputeTypeEnum; import com.baosight.hggp.common.ComputeTypeEnum;
import com.baosight.hggp.common.ProductTypeEnum; import com.baosight.hggp.common.ProductTypeEnum;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
...@@ -9,9 +10,7 @@ import com.baosight.hggp.hg.constant.HGConstant; ...@@ -9,9 +10,7 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ005A; import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.*;
import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sj.domain.HGSJ001; import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.sj.tools.HGSJTools; import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
...@@ -24,9 +23,6 @@ import org.apache.commons.lang.time.DateUtils; ...@@ -24,9 +23,6 @@ import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -424,5 +420,62 @@ public class HGSCTools { ...@@ -424,5 +420,62 @@ public class HGSCTools {
return remainder; return remainder;
} }
} }
public static class THGSC006{
public static void generatorOrder(List<HGSC005> hgsc005List, List<HGSC005A> hgsc005AList){
Map<String, Optional<HGSC005>> hgsc005Map = hgsc005List.stream().collect(Collectors.groupingBy(HGSC005::getPlanCode,Collectors.maxBy(
Comparator.comparingLong(HGSC005::getId))));
Map<String,List<HGSC005A>> hgsc005aMap = hgsc005AList.stream().collect(Collectors.groupingBy(HGSC005A::getPlanCode));
hgsc005Map.forEach((k,v) -> {
HGSC005 hgsc005 = v.get();
HGSC006 hgsc006 = constructObj(hgsc005);
List<HGSC006A> hgsc006AList = THGSC006A.constructObj(hgsc006,hgsc005aMap.get(hgsc005.getPlanCode()));
DaoUtils.insert(HGSC006.INSERT,hgsc006);
DaoUtils.insert(HGSC006A.INSERT,hgsc006AList);
});
}
public static HGSC006 constructObj(HGSC005 hgsc005){
HGSC006 hgsc006 = new HGSC006();
hgsc006.setOrderCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HPSC006_ORDER_CODE));
hgsc006.setMatId(hgsc005.getMatId());
hgsc006.setPlanId(hgsc005.getId());
hgsc006.setCompanyCode(hgsc005.getCompanyCode());
hgsc006.setCompanyName(hgsc005.getCompanyName());
hgsc006.setProjCode(hgsc005.getProjCode());
hgsc006.setProjName(hgsc005.getProjName());
hgsc006.setAssignStatus(AssignStatusEnum.UNASSIGN.getCode());
return hgsc006;
}
}
public static class THGSC006A{
public static List<HGSC006A> constructObj(HGSC006 hgsc006,List<HGSC005A> hgsc005AList){
List<HGSC006A> result = new ArrayList<>();
hgsc005AList.forEach(o -> {
HGSC006A hgsc006a = new HGSC006A();
hgsc006a.setPlanId(hgsc006.getPlanId());
hgsc006a.setOrderCode(hgsc006.getOrderCode());
hgsc006a.setPlanDetailId(o.getId());
hgsc006a.setCompanyCode(o.getCompanyCode());
hgsc006a.setCompanyName(o.getCompanyName());
hgsc006a.setProjCode(o.getProjCode());
hgsc006a.setProjName(o.getProjName());
hgsc006a.setInventProcessId(o.getInventProcessId());
hgsc006a.setTechFlowId(o.getTechFlowId());
hgsc006a.setTechFlowName(o.getTechFlowName());
hgsc006a.setProcessCode(o.getProcessCode());
hgsc006a.setProcessName(o.getProcessName());
hgsc006a.setProductCode(o.getProductCode());
hgsc006a.setProductName(o.getProductName());
hgsc006a.setPlanStartDate(o.getPlanStartDate());
hgsc006a.setPlanEndDate(o.getPlanEndDate());
hgsc006a.setQuantity(o.getQuantity());
hgsc006a.setUnassignQuantity(o.getQuantity());
hgsc006a.setAssignQuantity(0);
result.add(hgsc006a);
});
return result;
}
}
} }
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC002.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005A.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC006.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC006A.xml"/>
<!-- 財務 --> <!-- 財務 -->
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW001.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW001.xml"/>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFDateSpan startCname="签订日期(从)" endCname="至" blockId="inqu_status" <EF:EFDateSpan startCname="签订日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date" startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyyMMdd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="主合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="主合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains"> <EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<EF:EFColumn ename="contractContent" cname="签证事由及内容" width="120" enable="true" readonly="true" align="center" required="true"/> <EF:EFColumn ename="contractContent" cname="签证事由及内容" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="含税金额" width="120" enable="true" readonly="true" align="center" required="true"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="含税金额" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="true" readonly="true" align="center" editType="date" <EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true" <EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/> <EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......
$(function() { $(function() {
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
...@@ -25,6 +27,16 @@ $(function() { ...@@ -25,6 +27,16 @@ $(function() {
return template; return template;
} }
}, { }, {
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "spec", field: "spec",
template: function (options) { template: function (options) {
return $.trim(options.spec) == "" ? "无规格" : options.spec; return $.trim(options.spec) == "" ? "无规格" : options.spec;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="row"> <div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFColumn cname="存货编码" ename="inventCode" width="140" align="center" enable="false"/> <EF:EFColumn cname="存货编码" ename="inventCode" width="140" align="center" enable="false"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField" blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventName" cname="存货名称" width="80" align="center" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/> <EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
......
$(function() { $(function() {
var whTypeBox = __eiInfo.getBlock("wh_type_block_id").getMappedRows();
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
...@@ -9,6 +11,16 @@ $(function() { ...@@ -9,6 +11,16 @@ $(function() {
pageSizes: [10, 20, 30, 50, 100, 200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
columns: [{ columns: [{
field: "whType",
filter: function (options) {
return _.filter(whTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
},{
field: "createdName", field: "createdName",
template: function (options) { template: function (options) {
return showUserName(options.createdBy, options.createdName); return showUserName(options.createdBy, options.createdName);
......
...@@ -3,6 +3,9 @@ let WhNameGlobalData = []; ...@@ -3,6 +3,9 @@ let WhNameGlobalData = [];
let inventAllGlobalData = []; let inventAllGlobalData = [];
$(function() { $(function() {
var whTypeBox = __eiInfo.getBlock("wh_type_block_id").getMappedRows();
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
...@@ -11,8 +14,24 @@ $(function() { ...@@ -11,8 +14,24 @@ $(function() {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
columns: [{ columns: [
{
field: "whType",
filter: function (options) {
return _.filter(whTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "whCode", field: "whCode",
filter: function (options) {
return _.filter(WhNameGlobalData, function (item) {
return item["param1Field"]=="true";
})
},
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < WhNameGlobalData.length; i++) { for (let i = 0; i < WhNameGlobalData.length; i++) {
if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) { if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) {
...@@ -26,13 +45,28 @@ $(function() { ...@@ -26,13 +45,28 @@ $(function() {
inInfo.set("inqu_status-0-whType", options.model["whType"]); inInfo.set("inqu_status-0-whType", options.model["whType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ007"); inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryComboBox"); inInfo.set("methodName", "queryWhCodeBox");
inInfo.set("blockId", "wh_record_block_id"); inInfo.set("blockId", "wh_code_block_id");
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshSelect(container, inInfo); refreshSelect(container, inInfo);
} }
},{ },{
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
},{
field: "inventCode", field: "inventCode",
filter: function (options) {
return _.filter(InventNameGlobalData, function (item) {
return item["param1Field"]=="true";
})
},
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) { for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) { if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
...@@ -53,6 +87,11 @@ $(function() { ...@@ -53,6 +87,11 @@ $(function() {
} }
},{ },{
field: "inventRecordId", field: "inventRecordId",
filter: function (options) {
return _.filter(inventAllGlobalData, function (item) {
return item["param7Field"]=="true";
})
},
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) { for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) { if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
...@@ -65,8 +104,8 @@ $(function() { ...@@ -65,8 +104,8 @@ $(function() {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]); inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005"); inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBoxAll"); inInfo.set("methodName", "queryInventBoxAll");
inInfo.set("blockId", "invent_all_block_id"); inInfo.set("blockId", "invent_all_box_block_id");
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshSelect(container, inInfo); refreshSelect(container, inInfo);
} }
...@@ -100,11 +139,15 @@ $(function() { ...@@ -100,11 +139,15 @@ $(function() {
template: function (options) { template: function (options) {
return showUserName(options.updatedBy, options.updatedName); return showUserName(options.updatedBy, options.updatedName);
} }
}], }
],
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象 // 此grid对象
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
if (e.field == "inventRecordId") { if (e.field === "inventCode"){
loadChange(grid,e,"inventRecordId");
}
else if (e.field == "inventRecordId") {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
...@@ -160,9 +203,9 @@ let query = function () { ...@@ -160,9 +203,9 @@ let query = function () {
*/ */
let initWh = function () { let initWh = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
EiCommunicator.send("HGPZ007", "queryComboBox", inInfo, { EiCommunicator.send("HGPZ007", "queryWhCodeBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
WhNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows(); WhNameGlobalData = ei.getBlock("wh_code_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
...@@ -174,9 +217,9 @@ let initWh = function () { ...@@ -174,9 +217,9 @@ let initWh = function () {
*/ */
let initInvent = function () { let initInvent = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, { EiCommunicator.send("HGPZ005", "queryInventCodeBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
InventNameGlobalData = ei.getBlock("invent_record_block_id").getMappedRows(); InventNameGlobalData = ei.getBlock("invent_record_box_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
...@@ -190,9 +233,9 @@ let initSpec = function () { ...@@ -190,9 +233,9 @@ let initSpec = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryComboBoxAll", inInfo, { EiCommunicator.send("HGPZ005", "queryInventBoxAll", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
inventAllGlobalData = ei.getBlock("invent_all_block_id").getMappedRows(); inventAllGlobalData = ei.getBlock("invent_all_box_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3" filter="contains" <EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3" filter="contains"
defultValue=""> defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="仓库类型" blockId="inqu_status" ename="whType" row="0" colWidth="3" filter="contains" <EF:EFSelect cname="仓库类型" blockId="inqu_status" ename="whType" row="0" colWidth="3" filter="contains"
defultValue=""> defultValue="">
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField" blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -46,8 +46,8 @@ $(function () { ...@@ -46,8 +46,8 @@ $(function () {
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>'; 'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + /*template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',-1)" >审批未通过</a>'; 'onclick="updateStatus(' + item.id + ',-1)" >审批未通过</a>';*/
} else if (auditStatus == -1) { } else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>'; 'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
......
$(function () {
$(".row").children().attr("class", "col-md-3");
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
}
});
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [{
field: "status",
template: function (item) {
let template = '';
if (item.status == 1){
template = "<span style='color: #67c20b;font-weight: bold'>开机</span>";
}else if (item.status == 0){
template = "<span style='color: red;font-weight: bold'>关机</span>";
}
return template;
}
}
],
exportGrid: {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "设备监控_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
}
}
}
});
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/20
Time: 17:13
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="设备监控">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="logDate" cname="日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deviceName" cname="设备名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="运行状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="run_status_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="设备监控">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="logDate" cname="日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/>
<EF:EFComboColumn ename="deviceCode" cname="设备名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="deviceCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="运行状态"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="run_status_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="latelyStartTime" cname="最近开始日期" width="120" align="center" editType="datetime"
dateFormat="yyyy-MM-dd hh:mm:ss " parseFormats="['yyyyMMddHHmmss']" readonly="true" required="true"/>
<EF:EFColumn ename="startDura" cname="开机时长" width="120" align="center" editType="date"
dateFormat="hh时mm分" parseFormats="['hhmmss']" readonly="true" required="true"/>
<EF:EFColumn ename="latelyEntTime" cname="最近停机日期" width="120" align="center" editType="datetime"
dateFormat="yyyy-MM-dd hh:mm:ss " parseFormats="['yyyyMMddHHmmss']" readonly="true" required="true"/>
<EF:EFColumn ename="endDura" cname="关机时长" width="120" align="center" editType="date"
dateFormat="hh时mm分" parseFormats="['hhmmss']" readonly="true" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<style>
.my-head {
display: flex;
padding-right: 12px;
background: #ffffff;
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.12);
margin-bottom: 3px;
}
#my-front {
width: 50%;
display: flex;
align-items: center;
text-align: center;
justify-content: flex-start;
}
#my-behind {
width: 50%;
display: flex;
align-items: center;
text-align: center;
justify-content: flex-end;
padding-right: 4px;
}
.my-button {
border: none;
background: transparent;
margin-bottom: 2px;
margin-left: 16px;
}
.my-text {
font-size: .875rem;
height: 1.75rem;
line-height: 1;
letter-spacing: 0;
font-weight: 500;
overflow: hidden;
box-sizing: border-box;
display: inline-flex;
align-items: center;
}
#my-text1 {
color: #3088F4;
}
#my-text2 {
color: rgba(0, 0, 0, 0.85);
}
</style>
...@@ -233,7 +233,7 @@ function showDetail(id,companyCode,projCode) { ...@@ -233,7 +233,7 @@ function showDetail(id,companyCode,projCode) {
*/ */
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=WLQD&inqu_status-0-matId=" + id, href: "HGSC004B?methodName=initLoad&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>", title: "<div style='text-align: center;'>附件详情</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
......
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
loadComplete: function(grid){
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
},
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HGSC004C?methodName=initLoad&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId,bizType) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", docId);
inEiInfo.set("result-0-bizType", bizType);
EiCommunicator.send('HGSC004B', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC004B", "delete", true);
}
})
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="主表ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFSelect cname="文件类型" ename="inqu_status-0-bizType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.bizType" />
</EF:EFSelect>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFComboColumn ename="bizType" cname="文件类型" width="80" align="center" enable="false" required="false">
<EF:EFCodeOption codeName="hggp.sc.bizType" />
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
console.log($("#fileDocId").val())
saveTemp(e);
try {
parent.JSColorbox.setValueCallback(docId,$("#inqu_status-0-bizType").val());
} catch (e){
}
},
}
};
function saveTemp(e) {
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
let result = new EiInfo();
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val());
EiCommunicator.send("HGDS002", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件上传">
<EF:EFInput cname="主表ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFSelect cname="业务类型" ename="inqu_status-0-bizType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.bizType" />
</EF:EFSelect>
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="HGSC"/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showInfo(' + item.orderCode + ')" >计划详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.matId + ')" >附件详情</a>';
return template;
}
}
],
loadComplete: function(grid) {
},
onSuccess: function (e) {
}
}
});
function showInfo(planCode) {
JSColorbox.open({
href: "HGSC005A?methodName=initLoad&inqu_status-0-planCode=" + planCode + "&efParentFormEname=HGSC005",
title: "<div style='text-align: center;'>生产计划详情</div>",
width: "90%",
height: "90%"
});
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=XMRY&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "80%",
height: "80%",
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
</head>
<EF:EFPage title="生产订单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFDatePicker cname="生产订单日期" ename="inqu_status-0-createdTime" colWidth="3"
format="yyyy-MM-dd" readonly="false"/>
<EF:EFInput ename="inqu_status-0-orderCode" cname="生产订单单号" colWidth="3"/>
<EF:EFDatePicker cname="交货日期" ename="inqu_status-0-finishDate" colWidth="3"
format="yyyy-MM-dd" readonly="false"/>
<EF:EFSelect cname="派工状态" ename="inqu_status-0-assignStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.assignStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产订单日期" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="orderCode" cname="生产订单编号" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFComboColumn ename="assignStatus" cname="派工状态" width="80" align="center" required="true"
readonly="true">
<EF:EFCodeOption codeName="hggp.assignStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showTaskInfo(' + item.id + ')" >任务详情</a>';
return template;
}
}],
loadComplete: function(grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
function showTaskInfo(orderDetailId) {
// JSColorbox.open({
// href: "HGSC007?methodName=initLoad&inqu_status-0-orderDetailId=" + orderDetailId + "&efParentFormEname=HGSC006A",
// title: "<div style='text-align: center;'>生产任务详情</div>",
// width: "90%",
// height: "90%"
// });
}
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
</head>
<EF:EFPage title="生产计划详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-orderCode" cname="订单编码" type="hidden"/>
<EF:EFInput ename="inqu_status-0-productName" cname="产品名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFDatePicker cname="生产订单" ename="inqu_status-0-createdTime" colWidth="3"
format="yyyy-MM-dd" readonly="false"/>
<EF:EFDatePicker cname="派工日期" ename="inqu_status-0-assignDate" colWidth="3"
format="yyyy-MM-dd" readonly="false"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产订单日期" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="orderCode" cname="生产订单编号" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="quantity" cname="订单数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="assignDate" cname="派工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="assignQuantity" cname="派工数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unassignQuantity" cname="待派工数量" width="120" enable="true" align="center" readOnly="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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