Commit ebf4c877 by liuyang

2024-10-22

1.增加分支单位字段,取客户档案信息(客户类型增加分支单位),然后甲方选择客户类型为非分支单位,分支单位只选择客户类型为分支单位
2.客户可修改,除客户编码不能修改,其他可修改;已使用过的客户不能删除
3.已提交的不能删除销售合同,需要限制
parent 088ee8b6
...@@ -310,6 +310,8 @@ public enum DdynamicEnum { ...@@ -310,6 +310,8 @@ public enum DdynamicEnum {
* 编写:ly * 编写:ly
*/ */
PROCESS_CODE_BLOCK_ID("processCode_block_id","processCode","processName","factoryCode","factoryName","unit", "status","deleteFlag","costWeight","HGSJ001.queryProcessCode"), PROCESS_CODE_BLOCK_ID("processCode_block_id","processCode","processName","factoryCode","factoryName","unit", "status","deleteFlag","costWeight","HGSJ001.queryProcessCode"),
FLOW_CODE_BLOCK_ID("flowCodeBox_block_id","flowCode","flowName","HGSJ002.queryFlowCodeBox"),
/** /**
* 模块:设备台账编码 * 模块:设备台账编码
* 用途:设备区域下拉框 * 用途:设备区域下拉框
......
...@@ -45,6 +45,9 @@ public class HGCW003 extends DaoEPBase { ...@@ -45,6 +45,9 @@ public class HGCW003 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes"; public static final String FIELD_COMPANY_CODES = "companyCodes";
public static final String FIELD_MODEL = "model"; /*型号*/
public static final String FIELD_SPEC = "spec"; /*规格*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -104,6 +107,8 @@ public class HGCW003 extends DaoEPBase { ...@@ -104,6 +107,8 @@ public class HGCW003 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/ private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/ private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String model = " "; /*型号*/
private String spec = " "; /*规格*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -208,6 +213,13 @@ public class HGCW003 extends DaoEPBase { ...@@ -208,6 +213,13 @@ public class HGCW003 extends DaoEPBase {
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MODEL);
eiColumn.setDescName("型号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
} }
...@@ -554,6 +566,23 @@ public class HGCW003 extends DaoEPBase { ...@@ -554,6 +566,23 @@ public class HGCW003 extends DaoEPBase {
public void setDepCode(String depCode) { public void setDepCode(String depCode) {
this.depCode = depCode; this.depCode = depCode;
} }
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -583,6 +612,8 @@ public class HGCW003 extends DaoEPBase { ...@@ -583,6 +612,8 @@ public class HGCW003 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MODEL)), model));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
} }
/** /**
...@@ -613,6 +644,8 @@ public class HGCW003 extends DaoEPBase { ...@@ -613,6 +644,8 @@ public class HGCW003 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MODEL, StringUtils.toString(model, eiMetadata.getMeta(FIELD_MODEL)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
return map; return map;
} }
......
...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
...@@ -196,7 +197,12 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -196,7 +197,12 @@ public class ServiceHGCW002 extends ServiceBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW002.delete", resultRows.get(i)); HGCW002 hgcw002 = new HGCW002();
hgcw002.fromMap(resultRows.get(i));
if (hgcw002.getReviewStatus() == ReviewStatusEnum.SUBMITTED.getCode().intValue()){
throw new PlatException("该数据已提交,不能删除!");
}
DaoUtils.update("HGCW002.delete", hgcw002);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
...@@ -100,6 +100,12 @@ ...@@ -100,6 +100,12 @@
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="model">
MODEL = #model#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -125,7 +131,9 @@ ...@@ -125,7 +131,9 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 --> UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
MODEL AS "model",
SPEC as "spec"
FROM ${hggpSchema}.HGCW003 WHERE 1=1 FROM ${hggpSchema}.HGCW003 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -212,28 +220,33 @@ ...@@ -212,28 +220,33 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCW003 (ID, INSERT INTO ${hggpSchema}.HGCW003 (ID,
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 --> COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 合同号 --> CONTRACT_NUMBER, <!-- 合同号 -->
INVENTORY, <!-- 清单 --> INVENTORY, <!-- 清单 -->
UNIT, <!-- 单位 --> UNIT, <!-- 单位 -->
PROVISIONAL_QUANTITY, <!-- 暂定工程量 --> PROVISIONAL_QUANTITY, <!-- 暂定工程量 -->
MEASUREMENT_METHOD, <!-- 计量方式 --> MEASUREMENT_METHOD, <!-- 计量方式 -->
SUPPLY_METHOD, <!-- 材料供应方式 --> SUPPLY_METHOD, <!-- 材料供应方式 -->
UNIT_PRICE_EXCLUDING_TAX, <!-- 除税单价/元 --> UNIT_PRICE_EXCLUDING_TAX, <!-- 除税单价/元 -->
TOTAL_PRICE_EXCLUDING, <!-- 不含税总价 --> TOTAL_PRICE_EXCLUDING, <!-- 不含税总价 -->
TOTAL_PRICE_INCLUDING, <!-- 含税总价 --> TOTAL_PRICE_INCLUDING, <!-- 含税总价 -->
LABOR_COSTS, <!-- 其中人工费/元 --> LABOR_COSTS, <!-- 其中人工费/元 -->
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 --> CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 --> CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 --> UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 --> UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
) MODEL,
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #inventory#, #unit#, #provisionalQuantity#, #measurementMethod#, #supplyMethod#, #unitPriceExcludingTax#, #totalPriceExcluding#, #totalPriceIncluding#, #laborCosts#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#) SPEC
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #inventory#, #unit#,
#provisionalQuantity#, #measurementMethod#, #supplyMethod#, #unitPriceExcludingTax#, #totalPriceExcluding#,
#totalPriceIncluding#, #laborCosts#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #depCode#,#model#, #spec#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -263,7 +276,9 @@ ...@@ -263,7 +276,9 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
MODEL = #model#,
SPEC = #spec#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -380,12 +380,12 @@ public class HGCWTools { ...@@ -380,12 +380,12 @@ public class HGCWTools {
public static void save(List<Map> rows, String contractNumber, HGCW002 HGCW002) { public static void save(List<Map> rows, String contractNumber, HGCW002 HGCW002) {
AssertUtils.isNull(contractNumber, "合同号不能为空!"); AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> { rows.forEach(row -> {
HGCW003 HGCW003 = new HGCW003(); HGCW003 hgcw003 = new HGCW003();
HGCW003.fromMap(row); hgcw003.fromMap(row);
HGCW003.setCompanyCode(HGCW002.getCompanyCode()); hgcw003.setCompanyCode(HGCW002.getCompanyCode());
HGCW003.setCompanyName(HGCW002.getCompanyName()); hgcw003.setCompanyName(HGCW002.getCompanyName());
HGCW003.setContractNumber(contractNumber); hgcw003.setContractNumber(contractNumber);
DaoUtils.insert(HGCW003.INSERT, HGCW003); DaoUtils.insert(HGCW003.INSERT, hgcw003);
}); });
} }
......
...@@ -3,8 +3,10 @@ package com.baosight.hggp.hg.pz.service; ...@@ -3,8 +3,10 @@ package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
...@@ -25,6 +27,7 @@ import java.util.Arrays; ...@@ -25,6 +27,7 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 客户档案 * 客户档案
...@@ -82,9 +85,9 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -82,9 +85,9 @@ public class ServiceHGPZ002 extends ServiceBase {
// 数据校验 // 数据校验
this.checkSaveData(resultRows); this.checkSaveData(resultRows);
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGPZ002 hgpz002 = new HGPZ002(); HGPZ002 hgpz002 = new HGPZ002();
hgpz002.fromMap(resultRows.get(i)); hgpz002.fromMap(resultRow);
if (hgpz002.getId() == null || hgpz002.getId() == 0) { if (hgpz002.getId() == null || hgpz002.getId() == 0) {
this.add(hgpz002); this.add(hgpz002);
} else { } else {
...@@ -107,9 +110,9 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -107,9 +110,9 @@ public class ServiceHGPZ002 extends ServiceBase {
*/ */
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
// 数据校验 // 数据校验
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGPZ002 hgpz002 = new HGPZ002(); HGPZ002 hgpz002 = new HGPZ002();
hgpz002.fromMap(resultRows.get(i)); hgpz002.fromMap(resultRow);
AssertUtils.isNull(hgpz002.getStatus(), "是否启用不能为空"); AssertUtils.isNull(hgpz002.getStatus(), "是否启用不能为空");
} }
} }
...@@ -197,17 +200,22 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -197,17 +200,22 @@ public class ServiceHGPZ002 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户档案", operType = "删除", operDesc = "删除操作") @OperationLogAnnotation(operModul = "客户档案", operType = "删除", operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { List<String> custCodes = resultRows.stream().map(row -> row.get(HGPZ002.FIELD_CUST_CODE).toString()).collect(Collectors.toList());
List<HGCW002> hgcw002List = queryCustCode(custCodes);
for (Map resultRow : resultRows) {
HGPZ002 hgpz002 = new HGPZ002(); HGPZ002 hgpz002 = new HGPZ002();
hgpz002.fromMap(resultRows.get(i)); hgpz002.fromMap(resultRow);
// 校验企业下是否存在用户 // 校验企业下是否存在用户
int count = HGXSTools.XsUser.countByAccount(hgpz002.getAccountCode()); int count = HGXSTools.XsUser.countByAccount(hgpz002.getAccountCode());
if (count > 0) { if (count > 0) {
// throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName())); //throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName()));
} }
List<HGCW002> hgcw002s =hgcw002List.stream().filter(hgcw002 -> hgcw002.getPartyA().equals(hgpz002.getCustCode())).collect(Collectors.toList());
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,请先解除业务", hgpz002.getCustName()));
DaoUtils.update(HGPZ002.DELETE, hgpz002); DaoUtils.update(HGPZ002.DELETE, hgpz002);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -218,5 +226,14 @@ public class ServiceHGPZ002 extends ServiceBase { ...@@ -218,5 +226,14 @@ public class ServiceHGPZ002 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
public List<HGCW002> queryCustCode(List<String> custCodes){
List<HGCW002> hgcw002List = DaoBase.getInstance().query(HGCW002.QUERY,
new HashMap<String,Object>(){{
put("partyA", custCodes);
put("partyB", custCodes);
}});
return hgcw002List;
}
} }
...@@ -323,6 +323,9 @@ ...@@ -323,6 +323,9 @@
<isNotEmpty prepend=" AND " property="custType"> <isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType# CUST_TYPE = #custType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custTypes">
CUST_TYPE IN <iterate close=")" open="(" conjunction="," property="custTypes">#custTypes[]#</iterate>
</isNotEmpty>
ORDER BY CUST_CODE ORDER BY CUST_CODE
</select> </select>
......
...@@ -51,6 +51,7 @@ public class HGSC001 extends DaoEPBase { ...@@ -51,6 +51,7 @@ public class HGSC001 extends DaoEPBase {
public static final String FIELD_start_date = "startDate"; /* 开工日期*/ public static final String FIELD_start_date = "startDate"; /* 开工日期*/
public static final String FIELD_end_date = "endDate"; /* 完工日期*/ public static final String FIELD_end_date = "endDate"; /* 完工日期*/
public static final String FIELD_project_source = "projectSource"; /* 项目来源*/ public static final String FIELD_project_source = "projectSource"; /* 项目来源*/
public static final String FIELD_branch_unit = "branchUnit"; /*分子单位*/
public static final String COL_id = "id"; public static final String COL_id = "id";
public static final String COL_account_code = "account_code"; /* 帐套*/ public static final String COL_account_code = "account_code"; /* 帐套*/
...@@ -119,6 +120,7 @@ public class HGSC001 extends DaoEPBase { ...@@ -119,6 +120,7 @@ public class HGSC001 extends DaoEPBase {
private String startDate = " "; /* 开工日期*/ private String startDate = " "; /* 开工日期*/
private String endDate = " "; /* 完工日期*/ private String endDate = " "; /* 完工日期*/
private String projectSource = " "; /* 项目来源*/ private String projectSource = " "; /* 项目来源*/
private String branchUnit = " "; /*分支单位*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -246,6 +248,10 @@ public class HGSC001 extends DaoEPBase { ...@@ -246,6 +248,10 @@ public class HGSC001 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_project_source); eiColumn = new EiColumn(FIELD_project_source);
eiColumn.setDescName("项目来源"); eiColumn.setDescName("项目来源");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_branch_unit);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
} }
...@@ -737,6 +743,15 @@ public class HGSC001 extends DaoEPBase { ...@@ -737,6 +743,15 @@ public class HGSC001 extends DaoEPBase {
public void setProjectSource(String projectSource) { public void setProjectSource(String projectSource) {
this.projectSource = projectSource; this.projectSource = projectSource;
} }
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -775,6 +790,7 @@ public class HGSC001 extends DaoEPBase { ...@@ -775,6 +790,7 @@ public class HGSC001 extends DaoEPBase {
setStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_start_date)), startDate)); setStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_start_date)), startDate));
setEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_end_date)), endDate)); setEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_end_date)), endDate));
setProjectSource(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_project_source)), projectSource)); setProjectSource(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_project_source)), projectSource));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_branch_unit)), branchUnit));
} }
/** /**
...@@ -814,6 +830,7 @@ public class HGSC001 extends DaoEPBase { ...@@ -814,6 +830,7 @@ public class HGSC001 extends DaoEPBase {
map.put(FIELD_start_date, StringUtils.toString(startDate, eiMetadata.getMeta(FIELD_start_date))); map.put(FIELD_start_date, StringUtils.toString(startDate, eiMetadata.getMeta(FIELD_start_date)));
map.put(FIELD_end_date, StringUtils.toString(endDate, eiMetadata.getMeta(FIELD_end_date))); map.put(FIELD_end_date, StringUtils.toString(endDate, eiMetadata.getMeta(FIELD_end_date)));
map.put(FIELD_project_source, StringUtils.toString(projectSource, eiMetadata.getMeta(FIELD_project_source))); map.put(FIELD_project_source, StringUtils.toString(projectSource, eiMetadata.getMeta(FIELD_project_source)));
map.put(FIELD_branch_unit, StringUtils.toString(branchUnit, eiMetadata.getMeta(FIELD_branch_unit)));
return map; return map;
} }
......
...@@ -3,8 +3,11 @@ package com.baosight.hggp.hg.sc.service; ...@@ -3,8 +3,11 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant; import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.HGSC001A;
...@@ -14,12 +17,14 @@ import com.baosight.hggp.hg.xs.domain.Dept; ...@@ -14,12 +17,14 @@ import com.baosight.hggp.hg.xs.domain.Dept;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
...@@ -32,7 +37,6 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -32,7 +37,6 @@ public class ServiceHGSC001 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata);
// inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001());
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false);
...@@ -201,11 +205,23 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -201,11 +205,23 @@ public class ServiceHGSC001 extends ServiceBase {
String companyCode = MapUtils.getString(queryMap, HGSC001.FIELD_subcontract_code); String companyCode = MapUtils.getString(queryMap, HGSC001.FIELD_subcontract_code);
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
// map.put("companyCode", companyCode);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
map1.put(HGSC001.FIELD_account_code, map.get(HGSC001.FIELD_account_code));
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map);
if (!queryMap.containsKey(HGSC001.FIELD_branch_unit) || queryMap.get(HGSC001.FIELD_branch_unit).equals(CommonConstant.YesNo.NO_0)){
list = list.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
}else {
list = list.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
}
if (list.size() > 0){
List<String> custTypeList = list.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
map.put("custTypes", custTypeList);
}
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), map,false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), map,false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId()); CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
return inInfo; return inInfo;
} }
/** /**
......
...@@ -2,8 +2,10 @@ package com.baosight.hggp.hg.sc.service; ...@@ -2,8 +2,10 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
...@@ -12,6 +14,8 @@ import com.baosight.hggp.hg.xs.tools.HGXSTools; ...@@ -12,6 +14,8 @@ import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -19,6 +23,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -19,6 +23,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
...@@ -36,9 +41,32 @@ public class ServiceHGSC001C extends ServiceBase { ...@@ -36,9 +41,32 @@ public class ServiceHGSC001C extends ServiceBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), map,false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
EiInfoUtils.addBlock(inInfo,"userAll", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class); EiInfoUtils.addBlock(inInfo,"userAll", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
map1.put(HGSC001.FIELD_account_code, map.get(HGSC001.FIELD_account_code));
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} catch (InstantiationException e) { } catch (InstantiationException e) {
......
...@@ -2,8 +2,10 @@ package com.baosight.hggp.hg.sc.service; ...@@ -2,8 +2,10 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
...@@ -14,6 +16,7 @@ import com.baosight.hggp.hg.xs.tools.HGXSTools; ...@@ -14,6 +16,7 @@ import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -21,6 +24,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -21,6 +24,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
...@@ -43,6 +47,30 @@ public class ServiceHGSC001D extends ServiceBase { ...@@ -43,6 +47,30 @@ public class ServiceHGSC001D extends ServiceBase {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
EiInfoUtils.addBlock(inInfo,"depByCompany", UserSessionUtils.getDepByCompany((String) resultMap.get(HGSC001.FIELD_company_code)), Dept.class); EiInfoUtils.addBlock(inInfo,"depByCompany", UserSessionUtils.getDepByCompany((String) resultMap.get(HGSC001.FIELD_company_code)), Dept.class);
EiInfoUtils.addBlock(inInfo,"userAll", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class); EiInfoUtils.addBlock(inInfo,"userAll", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
map1.put(HGSC001.FIELD_account_code, map.get(HGSC001.FIELD_account_code));
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} catch (InstantiationException e) { } catch (InstantiationException e) {
......
...@@ -2,7 +2,9 @@ package com.baosight.hggp.hg.sc.service; ...@@ -2,7 +2,9 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A; import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
...@@ -14,15 +16,14 @@ import com.baosight.hggp.util.CommonMethod; ...@@ -14,15 +16,14 @@ import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays; import java.util.*;
import java.util.HashMap; import java.util.stream.Collectors;
import java.util.List;
import java.util.Map;
/** /**
...@@ -45,6 +46,30 @@ public class ServiceHGSC001U extends ServiceBase { ...@@ -45,6 +46,30 @@ public class ServiceHGSC001U extends ServiceBase {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
EiInfoUtils.addBlock(inInfo,"depByCompany", UserSessionUtils.getDepByCompany((String) resultMap.get(HGSC001.FIELD_company_code)), Dept.class); EiInfoUtils.addBlock(inInfo,"depByCompany", UserSessionUtils.getDepByCompany((String) resultMap.get(HGSC001.FIELD_company_code)), Dept.class);
EiInfoUtils.addBlock(inInfo,"userAll", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class); EiInfoUtils.addBlock(inInfo,"userAll", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
map1.put(HGSC001.FIELD_account_code, map.get(HGSC001.FIELD_account_code));
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} catch (InstantiationException e) { } catch (InstantiationException e) {
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
permiss_start_date as "permissStartDate", <!-- 准许开工日期 --> permiss_start_date as "permissStartDate", <!-- 准许开工日期 -->
start_date as "startDate", <!-- 开工日期 --> start_date as "startDate", <!-- 开工日期 -->
end_date as "endDate", <!-- 完工日期 --> end_date as "endDate", <!-- 完工日期 -->
project_source as "projectSource" <!-- 项目来源 --> project_source as "projectSource", <!-- 项目来源 -->
branch_unit as "branchUnit" <!-- 分公司 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -118,6 +119,9 @@ ...@@ -118,6 +119,9 @@
<isNotEmpty prepend=" AND " property="projectSource"> <isNotEmpty prepend=" AND " property="projectSource">
project_source = #projectSource# project_source = #projectSource#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
branch_unit = #branchUnit#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -185,13 +189,14 @@ ...@@ -185,13 +189,14 @@
updated_name, <!-- 修改人名称 --> updated_name, <!-- 修改人名称 -->
updated_time, <!-- 更新时间 --> updated_time, <!-- 更新时间 -->
contract_no, <!-- 合同号 --> contract_no, <!-- 合同号 -->
project_source project_source,
branch_unit
) )
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #subcontractCode#, #subcontractName#, VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #subcontractCode#, #subcontractName#,
#genralContractCode#, #genralContractName#, #partyPmName#, #partyPmHpone#, #contractName#, #contractWorkTxt#, #genralContractCode#, #genralContractName#, #partyPmName#, #partyPmHpone#, #contractName#, #contractWorkTxt#,
#projCode#, #projName#, #projType#, #projStatus#, #approvalStatus#, #permissStartDate#, #startDate#, #endDate#, #projCode#, #projName#, #projType#, #projStatus#, #approvalStatus#, #permissStartDate#, #startDate#, #endDate#,
#accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,
#contractNo#, #projectSource#) #contractNo#, #projectSource#, #branchUnit#)
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC001 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC001
</selectKey> </selectKey>
...@@ -233,7 +238,8 @@ ...@@ -233,7 +238,8 @@
end_date = #endDate#, <!-- 完工日期 --> end_date = #endDate#, <!-- 完工日期 -->
updated_by = #updatedBy#, <!-- 更新人 --> updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 --> updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 --> updated_time = #updatedTime#, <!-- 更新时间 -->
branch_unit = #branchUnit#
WHERE id = #id# WHERE id = #id#
</update> </update>
......
...@@ -36,7 +36,7 @@ public class ServiceHGSJ002A extends ServiceEPBase { ...@@ -36,7 +36,7 @@ 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();
EiInfo outInfo = super.query(inInfo, HGSJ002A.QUERY, new HGSJ002A()); EiInfo outInfo = super.query(inInfo, HGSJ002A.QUERY, new HGSJ002A());
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID), CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID,DdynamicEnum.FLOW_CODE_BLOCK_ID),
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put(HGSJ002A.FIELD_FACTORY_CODE,factoryCode); put(HGSJ002A.FIELD_FACTORY_CODE,factoryCode);
}}); }});
......
...@@ -251,4 +251,21 @@ ...@@ -251,4 +251,21 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryFlowCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
FLOW_CODE as "flowCode", <!-- 流程编码 -->
FLOW_NAME as "flowName" <!-- 流程名称 -->
FROM ${hggpSchema}.HGGY002 WHERE 1=1 and STATUS = 1 and DELETE_FLAG = 0
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
FLOW_CODE desc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/> <EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
<EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/> <EF:EFInput ename="contractCategory" cname="合同类别" colWidth="4" readonly="true"/>
<%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%> <%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%>
<%-- <EF:EFOption label="-- 请选择 --" value=""/>--%> <%-- <EF:EFOption label="-- 请选择 --" value=""/>--%>
<%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%> <%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%>
...@@ -122,6 +122,8 @@ ...@@ -122,6 +122,8 @@
<%--<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>--%> <%--<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>--%>
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" /> <EF:EFColumn ename="inventory" cname="清单" align="center" />
<EF:EFColumn ename="model" cname="型号" align="center" />
<EF:EFColumn ename="spec" cname="规格" align="center" />
<EF:EFColumn ename="unit" cname="单位" align="center" /> <EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/> <EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" /> <EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" />
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/> <EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
<EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/> <EF:EFInput ename="contractCategory" cname="合同类别" colWidth="4" readonly="true"/>
<%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%> <%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%>
<%-- <EF:EFOption label="-- 请选择 --" value=""/>--%> <%-- <EF:EFOption label="-- 请选择 --" value=""/>--%>
<%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%> <%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%>
...@@ -128,6 +128,8 @@ ...@@ -128,6 +128,8 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="contractNumber" cname="合同号" hidden="true"/> <EF:EFColumn ename="contractNumber" cname="合同号" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" /> <EF:EFColumn ename="inventory" cname="清单" align="center" />
<EF:EFColumn ename="model" cname="型号" align="center" />
<EF:EFColumn ename="spec" cname="规格" align="center" />
<EF:EFColumn ename="unit" cname="单位" align="center" /> <EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/> <EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" /> <EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" />
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="contractNumber" cname="合同号" hidden="true"/> <EF:EFColumn ename="contractNumber" cname="合同号" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" enable="false"/> <EF:EFColumn ename="inventory" cname="清单" align="center" enable="false"/>
<EF:EFColumn ename="model" cname="型号" align="center" enable="false"/>
<EF:EFColumn ename="spec" cname="规格" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" enable="false"/> <EF:EFColumn ename="unit" cname="单位" align="center" enable="false"/>
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center" enable="false"/> <EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" enable="false"/> <EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" enable="false"/>
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn cname="客户编码" ename="custCode" enable="false" width="120" align="center"/> <EF:EFColumn cname="客户编码" ename="custCode" enable="false" width="120" align="center"/>
<EF:EFColumn cname="客户名称" ename="custName" width="140" align="center" required="true"/> <EF:EFColumn cname="客户名称" ename="custName" width="140" align="center" readonly="false" required="true"/>
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" defaultValue="" required="true" <EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" required="true" filter="contains">
filter="contains">
<EF:EFOptions blockId="customer_type_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="customer_type_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn cname="客户类别" ename="custClass" width="100" align="center" required="true" defaultValue="1"> <EF:EFComboColumn cname="客户类别" ename="custClass" width="100" align="center" required="true" defaultValue="1">
...@@ -39,8 +38,7 @@ ...@@ -39,8 +38,7 @@
<EF:EFColumn cname="地址" ename="address" align="center" width="200" /> <EF:EFColumn cname="地址" ename="address" align="center" width="200" />
<EF:EFColumn cname="收货地址" ename="putAddress" align="center" width="200" /> <EF:EFColumn cname="收货地址" ename="putAddress" align="center" width="200" />
<EF:EFColumn cname="联系人" ename="headName" align="center" width="200" /> <EF:EFColumn cname="联系人" ename="headName" align="center" width="200" />
<EF:EFColumn cname="电话" ename="phoneName" align="center" width="200" <EF:EFColumn cname="电话" ename="phoneName" align="center" width="200" data-rules="mobile_phone"/>
data-rules="mobile_phone"/>
<EF:EFComboColumn cname="状态" ename="status" width="90" align="center" required="true" defaultValue="1"> <EF:EFComboColumn cname="状态" ename="status" width="90" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
<EF:EFOption label="-- 请选择 --" value="" /> <EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/> <EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="result-0-branchUnit" cname="分支单位" colWidth="4" required="true" filter="contains"
textField="textField" valueField="valueField">
<EF:EFOptions blockId="customer1_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFInput ename="result-0-depName" cname="部门名称" type="hidden"/> <%--<EF:EFInput ename="result-0-depName" cname="部门名称" type="hidden"/>
<EF:EFCascadeSelect cascadeFrom="result-0-companyCode" cname="部门" ename="result-0-depCode" type="hidden" <EF:EFCascadeSelect cascadeFrom="result-0-companyCode" cname="部门" ename="result-0-depCode" type="hidden"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
...@@ -25,8 +29,9 @@ ...@@ -25,8 +29,9 @@
<EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/> <EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/>
<EF:EFSelect ename="result-0-genralContractCode" cname="甲方" colWidth="4" required="true" filter="contains" <EF:EFSelect ename="result-0-genralContractCode" cname="甲方" colWidth="4" required="true" filter="contains"
serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id" textField="textField" valueField="valueField">
textField="textField" valueField="valueField"/> <EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode" <%--<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id" serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id"
......
...@@ -19,14 +19,19 @@ ...@@ -19,14 +19,19 @@
serviceName="HGSC001" methodName="depByCompanyComboBox" resultId="depByCompany" serviceName="HGSC001" methodName="depByCompanyComboBox" resultId="depByCompany"
textField="depName" valueField="depCode" > textField="depName" valueField="depCode" >
</EF:EFCascadeSelect>--%> </EF:EFCascadeSelect>--%>
<EF:EFSelect ename="result-0-branchUnit" cname="分支单位" colWidth="4" required="true" filter="contains"
textField="textField" valueField="valueField">
<EF:EFOptions blockId="customer1_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/> <EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/>
<EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/> <EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/>
<EF:EFSelect ename="result-0-genralContractCode" cname="甲方" colWidth="4" required="true" filter="contains" <EF:EFSelect ename="result-0-genralContractCode" cname="甲方" colWidth="4" required="true" filter="contains"
serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id" textField="textField" valueField="valueField">
textField="textField" valueField="valueField"/> <EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode" <%--<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id" serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id"
......
...@@ -22,14 +22,19 @@ ...@@ -22,14 +22,19 @@
serviceName="HGSC001" methodName="depByCompanyComboBox" resultId="depByCompany" serviceName="HGSC001" methodName="depByCompanyComboBox" resultId="depByCompany"
textField="depName" valueField="depCode" > textField="depName" valueField="depCode" >
</EF:EFCascadeSelect>--%> </EF:EFCascadeSelect>--%>
<EF:EFSelect ename="result-0-branchUnit" cname="分支单位" colWidth="4" required="true" filter="contains"
textField="textField" valueField="valueField">
<EF:EFOptions blockId="customer1_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/> <EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/>
<EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/> <EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/>
<EF:EFSelect ename="result-0-genralContractCode" cname="甲方" colWidth="4" required="true" filter="contains" <EF:EFSelect ename="result-0-genralContractCode" cname="甲方" colWidth="4" required="true" filter="contains"
serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id" textField="textField" valueField="valueField">
textField="textField" valueField="valueField"/> <EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode" <%--<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id" serviceName="HGSC001" methodName="genralContractComboBox" resultId="customer_record_block_id"
......
...@@ -28,7 +28,7 @@ $(function (){ ...@@ -28,7 +28,7 @@ $(function (){
let template = ''; let template = '';
if (item.id){ if (item.id){
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="showDetail(' + item.id + ',\''+item.factoryCode+'\',\''+item.flowCode+'\',\''+item.flowName+'\')" >工艺流程详情</a>'; + 'onclick="showDetail(' + item.id + ',\''+item.factoryCode+'\',\''+item.flowCode+'\')" >工艺流程详情</a>';
if (status == 0) { if (status == 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>';
...@@ -181,10 +181,10 @@ function updateStatus(id,status) { ...@@ -181,10 +181,10 @@ function updateStatus(id,status) {
/** /**
* 显示详情 * 显示详情
*/ */
function showDetail(id,factoryCode,flowCode,flowName) { function showDetail(id,factoryCode,flowCode) {
JSColorbox.open({ JSColorbox.open({
href: "HGSJ002A?methodName=initLoad&inqu_status-0-parendId=" + id+ href: "HGSJ002A?methodName=initLoad&inqu_status-0-parendId=" + id+
"&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-flowName="+flowName+"&inqu_status-0-factoryCode="+factoryCode, "&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-factoryCode="+factoryCode,
title: "<div style='text-align: center;'>工艺流程详情</div>", title: "<div style='text-align: center;'>工艺流程详情</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="flowCode" cname="流程编码" colWidth="3" placeholder="模糊查询" readonly="true"/> <EF:EFSelect blockId="inqu_status" row="0" ename="flowCode" cname="流程名称" colWidth="3" filter="contains" readonly="true">
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" colWidth="3" placeholder="模糊查询" readonly="true"/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="flowCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序名称" colWidth="3" placeholder="模糊查询"/> <EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序名称" colWidth="3" placeholder="模糊查询"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains"> <%--<EF:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
......
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