Commit 3a50ec73 by 江和松

物料清单代码提交

parent 5f6cc8b7
......@@ -29,21 +29,21 @@ public enum DdynamicEnum {
* 编写:wwl
*/
PROJ_TYPE_BLOCK_ID("proj_type_block_id", "natCode", "natName", "HGPZ008.queryComboBox"),
/**
* 模块:客户类型
* 用途:客户类型下拉框
* 编写:
*/
CUSTOMER_TYPE_BLOCK_ID("customer_type_block_id", "custType", "custTypeName", "HGPZ001.queryComboBox"),
/**
* 模块:客户档案
* 用途:客户档案下拉框
* 编写:wwl
*/
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id", "custCode", "custName", "HGPZ002.queryComboBox"),
/**
* 模块:供应商档案
* 用途:供应商档案下拉框
......@@ -85,37 +85,37 @@ public enum DdynamicEnum {
* 编写:
*/
SPEC_RECORD_BLOCK_ID("spec_record_block_id", "id", "spec", "HGPZ005.queryComboBoxAll"),
/**
* 模块:规格(无ID)
* 用途:存货档案下拉框
* 编写:
*/
SPEC_NAME_BLOCK_ID("spec_name_block_id", "spec", "spec", "HGPZ005.queryComboBoxSpecName"),
/**
* 模块:仓库类型
* 用途:仓库类型下拉框
* 编写:
*/
WH_TYPE_BLOCK_ID("wh_type_block_id", "whType", "whTypeName", "HGPZ006.queryComboBox"),
/**
* 模块:仓库档案
* 用途:仓库档案下拉框
* 编写:
*/
WH_RECORD_BLOCK_ID("wh_record_block_id", "whCode", "whName", "HGPZ007.queryComboBox"),
/**
* 模块:厂区管理
* 用途:厂区管理下拉框
* 编写:songx
*/
FACTORY_RECORD_BLOCK_ID("factory_record_block_id", "orgId", "orgCname", "HGXSOrg.queryFactoryComboBox"),
/**
* 模块:组管理
* 用途:组管理下拉框
......@@ -143,7 +143,7 @@ public enum DdynamicEnum {
* 编写:yk
*/
USER_BLOCK_ID("user_block_id","loginName","userName","HGXSUser.queryComboBox"),
/**
* 模块:系统管理
* 用途:部门
......@@ -153,7 +153,7 @@ public enum DdynamicEnum {
"companyName", "HGXSOrg.queryAll", new HashMap() {{
put("orgType", OrgTypeEnum.DEPT.getCode());
}}),
/**
* 模块:系统管理
* 用途:厂区查询
......@@ -163,7 +163,7 @@ public enum DdynamicEnum {
"companyName", "HGXSOrg.queryAll", new HashMap() {{
put("orgType", OrgTypeEnum.FACTORY.getCode());
}}),
/**
* 模块:系统管理
* 用途:公司查询
......@@ -174,7 +174,7 @@ public enum DdynamicEnum {
put("orgType", OrgTypeEnum.COMPANY.getCode());
}}
),
/**
* 模块:公司名称
* 用途:工序设计下拉框
......@@ -219,6 +219,13 @@ public enum DdynamicEnum {
*/
PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName", "HGSC001.queryComboBox"),
/**
* 模块:蓝图
* 用途:蓝图下拉框
* 编写:jhs
*/
BLUEPRINT_BOX_BLOCK_ID("blueprint_box_block_id", "blueprintCode", "blueprintName", "HGSC003.queryComboBox"),
;
......@@ -240,7 +247,7 @@ public enum DdynamicEnum {
private String param4;
private String param5;
private String param6;
private String param7;
......@@ -252,7 +259,7 @@ public enum DdynamicEnum {
private final String dbSource;
private Map paramMap;
DdynamicEnum(String blockId, String value, String text, String param1, String dbSource) {
this.blockId = blockId;
this.value = value;
......@@ -269,7 +276,7 @@ public enum DdynamicEnum {
this.param2 = param2;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String dbSource,
Map paramMap) {
this.blockId = blockId;
......@@ -280,7 +287,7 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
this.paramMap = paramMap;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String dbSource) {
this.blockId = blockId;
this.value = value;
......@@ -301,7 +308,7 @@ public enum DdynamicEnum {
this.param4 = param4;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3,
String param4, String dbSource, Map paramMap) {
this.blockId = blockId;
......@@ -314,7 +321,7 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
this.paramMap = paramMap;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4, String param5, String dbSource) {
this.blockId = blockId;
this.value = value;
......@@ -326,7 +333,7 @@ public enum DdynamicEnum {
this.param5 = param5;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String dbSource) {
this.blockId = blockId;
......@@ -357,7 +364,7 @@ public enum DdynamicEnum {
this.param9 = param9;
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, Map paramMap) {
......@@ -376,14 +383,14 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
this.paramMap = paramMap;
}
DdynamicEnum(String blockId, String value, String text, String dbSource){
this.blockId = blockId;
this.value = value;
this.text = text;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String dbSource, Map paramMap) {
this.blockId = blockId;
this.value = value;
......@@ -391,7 +398,7 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
this.paramMap = paramMap;
}
public String getDbSource() {
return dbSource;
}
......@@ -447,11 +454,11 @@ public enum DdynamicEnum {
public void setParam5(String param5) {
this.param5 = param5;
}
public String getParam6() {
return param6;
}
public void setParam6(String param6) {
this.param6 = param6;
}
......@@ -479,7 +486,7 @@ public enum DdynamicEnum {
public void setParam9(String param9) {
this.param9 = param9;
}
public Map getParamMap() {
return paramMap;
}
......
......@@ -211,4 +211,32 @@ public class HGConstant {
public static final Integer YS = 2;
}
/**
*
* 物料提交状态
* @author:songx
* @date:2024/5/15,15:18
*/
public static class MaterialStatus {
// 未提交
public static final Integer WTJ = 0;
// 部分提交
public static final Integer BFTJ = 1;
// 全部提交
public static final Integer QBTJ = 2;
}
/**
*
* 物料提交状态
* @author:songx
* @date:2024/5/15,15:18
*/
public static class ProductStatus {
// 未提交
public static final Integer WTJ = 0;
// 已提交
public static final Integer YTJ = 2;
}
}
......@@ -60,7 +60,6 @@ public class ServiceHGSC003 extends ServiceBase {
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC003.FIELD_id);
DaoUtils.update(HGSC003.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
// HGSCTools.THGSC003A.deleteByProIds(ids);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......@@ -121,7 +120,11 @@ public class ServiceHGSC003 extends ServiceBase {
map.put("projCode",hgsc003.getProjCode());
List<HGSC003> oldHgsc003List = this.dao.query(HGSC003.QUERY,map);
for(HGSC003 o : oldHgsc003List){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc003.getId().intValue()),"已存在此项目号的蓝图!");
if(Objects.nonNull(hgsc003.getId())&&hgsc003.getId()>0){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc003.getId().intValue()),"已存在此项目号的蓝图!");
}else{
AssertUtils.isTrue(Objects.nonNull(o),"已存在此项目号的蓝图!");
}
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
......@@ -178,5 +181,22 @@ public class ServiceHGSC003 extends ServiceBase {
}
/**
* 蓝图查询下拉框
* @param inInfo
* @return
*/
public EiInfo blueprintComboBox(EiInfo inInfo){
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String companyCode = MapUtils.getString(queryMap, HGSC003.FIELD_company_code);
String blueprintStatus = MapUtils.getString(queryMap, HGSC003.FIELD_blueprint_status);
Map map = new HashMap();
map.put(HGSC003.FIELD_account_code, UserSessionUtils.getAccountCode());
map.put(HGSC003.FIELD_company_code, companyCode);
map.put(HGSC003.FIELD_blueprint_status, blueprintStatus);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.BLUEPRINT_BOX_BLOCK_ID), map,false);
return inInfo;
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC003A;
import com.baosight.hggp.util.*;
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.*;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public class ServiceHGSC003A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC003A.QUERY, new HGSC003A());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC003A.QUERY, new HGSC003A());
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC003A.FIELD_id);
DaoUtils.update(HGSC003A.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public EiInfo save(EiInfo inInfo){
try {
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGSC003A hgsc003a = new HGSC003A();
hgsc003a.fromMap(resultMap);
//查询蓝图
HGSC003 hgsc003 = (HGSC003) super.dao.get(HGSC003.QUERY,HGSC003.FIELD_id,hgsc003a.getBlueprintId());
//复制蓝图基本信息
hgsc003a.setCompanyCode(hgsc003.getCompanyCode());
hgsc003a.setCompanyName(hgsc003.getCompanyName());
hgsc003a.setDepCode(hgsc003.getDepCode());
hgsc003a.setDepName(hgsc003.getDepName());
hgsc003a.setProjCode(hgsc003.getProjCode());
hgsc003a.setProjName(hgsc003.getProjName());
this.checkSaveData(hgsc003a,hgsc003);
if(Objects.nonNull(hgsc003a.getId())&&hgsc003a.getId()!=0){
DaoUtils.update(HGSC003A.UPDATE, hgsc003a);
}else {
DaoUtils.insert(HGSC003A.INSERT, hgsc003a);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc003a
*/
private void checkSaveData(HGSC003A hgsc003a,HGSC003 hgsc003) {
if(Objects.nonNull(hgsc003a.getId())&&hgsc003a.getId()>0){
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
}
AssertUtils.isEmpty(hgsc003a.getDrawingCode(), "请填写图号!");
AssertUtils.isEmpty(hgsc003a.getDrawingName(), "请填写图纸名称!");
Map<String,Object> map = new HashMap<>();
map.put("blueprintId",hgsc003a.getBlueprintId());
map.put("drawingCode",hgsc003a.getDrawingCode());
List<HGSC003A> oldhgsc003aList = this.dao.query(HGSC003A.QUERY,map);
for(HGSC003A o : oldhgsc003aList){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc003a.getId().intValue()),"当前图号已存在!");
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc003a.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc003a.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc003a.getProjName(), "请填写项目名称!");
AssertUtils.isEmpty(hgsc003a.getBlueprintName(), "请填写蓝图名称!");
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.util.*;
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.*;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public class ServiceHGSC004 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004.QUERY, new HGSC004());
Map map = new HashMap();
map.put(HGSC004.FIELD_account_code, UserSessionUtils.getAccountCode());
map.put(HGSC003.FIELD_blueprint_status, HGConstant.EnablingStatus.QY);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.BLUEPRINT_BOX_BLOCK_ID),map,false
);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004.QUERY, new HGSC004());
Map map = new HashMap();
map.put(HGSC004.FIELD_account_code, UserSessionUtils.getAccountCode());
map.put(HGSC003.FIELD_blueprint_status, HGConstant.EnablingStatus.QY);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.BLUEPRINT_BOX_BLOCK_ID),map,false
);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC004.FIELD_id);
DaoUtils.update(HGSC004.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public EiInfo batchSubmit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
DaoUtils.update(HGSC004.BATCH_SUBMIT, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据停用成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public EiInfo save(EiInfo inInfo){
try {
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGSC004 hgsc004 = new HGSC004();
hgsc004.fromMap(resultMap);
HGSC003 hgsc003 = (HGSC003) super.dao.get(HGSC003.QUERY,HGSC004.FIELD_blueprint_code,hgsc004.getBlueprintCode());
hgsc004.setBlueprintId(hgsc003.getId());
this.checkSaveData(hgsc004,hgsc003);
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()!=0){
DaoUtils.update(HGSC004.UPDATE, hgsc004);
}else {
hgsc004.setMaterialStatus(HGConstant.MaterialStatus.WTJ);
DaoUtils.insert(HGSC004.INSERT, hgsc004);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc004
*/
private void checkSaveData(HGSC004 hgsc004,HGSC003 hgsc003) {
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
}
Map<String,Object> map = new HashMap<>();
map.put("blueprintId",hgsc004.getBlueprintId());
List<HGSC004> hgsc004List = this.dao.query(HGSC004.QUERY,map);
for(HGSC004 o : hgsc004List){
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc004.getId().intValue()),"当前蓝图已存在!");
}else{
AssertUtils.isTrue(Objects.nonNull(o),"当前蓝图已存在!");
}
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc004.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc004.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc004.getProjName(), "请填写项目名称!");
AssertUtils.isEmpty(hgsc004.getBlueprintName(), "请填写蓝图名称!");
}
}
package com.baosight.hggp.hg.sc.service;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.xs.domain.Org;
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.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.*;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public class ServiceHGSC004A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004A.QUERY, new HGSC004A());
Map map = new HashMap();
map.put(HGSC004A.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID),map,false
);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004A.QUERY, new HGSC004A());
Map map = new HashMap();
map.put(HGSC004A.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID),map,false
);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC004A.FIELD_id);
// DaoUtils.update(HGSC004A.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public EiInfo batchSubmit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
// DaoUtils.update(HGSC004A.BATCH_SUBMIT, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据停用成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public EiInfo save(EiInfo inInfo){
try {
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGSC004A hgsc004a = new HGSC004A();
hgsc004a.fromMap(resultMap);
HGSC003 hgsc003 = (HGSC003) super.dao.get(HGSC003.QUERY,HGSC004A.FIELD_id,hgsc004a.getId());
this.checkSaveData(hgsc004a,hgsc003);
if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()!=0){
DaoUtils.update(HGSC004A.UPDATE, hgsc004a);
}else {
hgsc004a.setProductStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGSC004A.INSERT, hgsc004a);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc004a
*/
private void checkSaveData(HGSC004A hgsc004a,HGSC003 hgsc003) {
if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()>0){
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc004a.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc004a.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc004a.getProjName(), "请填写项目名称!");
}
/**
* 指定树节点
* @param inInfo
* @return
*/
public EiInfo queryTreeRoot(EiInfo inInfo) {
String orgEname = StringUtils.toString(inInfo.get("orgEname"));
Map queryMap = new HashMap();
String root = "";
if (orgEname != null) {
Map map = new HashMap();
map.put("orgEname", orgEname);
map.put("orgType", OrgTypeEnum.COMPANY.getCode());
Org org = (Org) dao.get("HGSC004A.queryCompany", "id",orgEname);
root = org.getOrgEname() + ":" + org.getOrgCname();
}
inInfo.set("root",root);
return inInfo;
}
//树查询服务
public EiInfo queryTreeNode(EiInfo inInfo) {
//1 获取参数
String pEname = inInfo.getCellStr(EiConstant.queryBlock, 0, "node");
if(org.apache.commons.lang.StringUtils.equals("$",pEname)){
pEname = "root";
}
Long projId = NumberUtils.toLong(inInfo.get("projId"));
String orgEname = StringUtils.toString(inInfo.get("orgEname"));
Map queryMap = new HashMap();
queryMap.put("companyCode", pEname);
if (orgEname != null) {
Map map = new HashMap();
map.put("orgEname", orgEname);
List list = dao.query("HGSC004A.queryCompany", map);
if (list.size() > 0) {
queryMap.put("orgEname", orgEname);
}
}
//2 查询节点
List rows = dao.query("HGSC004A.query", queryMap);
//3 增加节点block块
EiInfo outInfo = new EiInfo();
EiBlock outBlock = outInfo.addBlock(BeanUtil.isEmpty(pEname) ? "" : pEname);
outBlock.addRows(rows);
return outInfo;
}
/**
* 修改父级节点的LEAF状态为1
*
* @param id
*/
public void checkTreeNodeLeaf(Long id) {
EiInfo eiInfo = new EiInfo();
//1 获取参数
Map queryMap = new HashMap();
queryMap.put("id", id);
// List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap);
// if(rows.size() > 0){
// queryMap.put("leaf", "0");
// }else{
// queryMap.put("leaf", "1");
// }
// DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
}
}
......@@ -114,31 +114,30 @@
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC003 WHERE
DELETE FROM ${hggpSchema}.HGSC003 WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC003
SET
id = #id#, <!-- 主键 -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编码 -->
dep_name = #depName#, <!-- 部门名称 -->
blueprint_code = #blueprintCode#, <!-- 蓝图编号 -->
blueprint_name = #blueprintName#, <!-- 蓝图名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
blueprint_status = #blueprintStatus#, <!-- 蓝图状态 0:停用,1:启用 -->
approval_status = #approvalStatus#, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编码 -->
dep_name = #depName#, <!-- 部门名称 -->
blueprint_code = #blueprintCode#, <!-- 蓝图编号 -->
blueprint_name = #blueprintName#, <!-- 蓝图名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
blueprint_status = #blueprintStatus#, <!-- 蓝图状态 0:停用,1:启用 -->
approval_status = #approvalStatus#, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE id = #id#
</update>
<delete id="batchDelete">
......@@ -167,4 +166,30 @@
WHERE
ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
BLUEPRINT_CODE as "blueprintCode", <!-- 蓝图编号 -->
BLUEPRINT_NAME as "blueprintName" <!-- 蓝图名称 -->
FROM ${hggpSchema}.HGSC003
WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintStatus">
BLUEPRINT_STATUS = #blueprintStatus#
</isNotEmpty>
ORDER BY BLUEPRINT_CODE
</select>
</sqlMap>
<?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">
<sqlMap namespace="HGSC003A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name = #blueprintName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="drawingCode">
drawing_code like ('%$drawingCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="drawingName">
drawing_name like ('%$drawingName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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.HGSC003A">
SELECT
id as "id", <!-- 主键 -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编号 -->
dep_name as "depName", <!-- 部门名称 -->
blueprint_id as "blueprintId", <!-- 蓝图id -->
blueprint_code as "blueprintCode", <!-- 蓝图编号 -->
blueprint_name as "blueprintName", <!-- 蓝图名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
drawing_code as "drawingCode", <!-- 图号 -->
drawing_name as "drawingName", <!-- 图纸名称 -->
account_code as "accountCode", <!-- 帐套 -->
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}.HGSC003A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC003A WHERE 1=1
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC003A (id, <!-- 主键 -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
dep_code, <!-- 部门编号 -->
dep_name, <!-- 部门名称 -->
blueprint_id, <!-- 蓝图id -->
blueprint_code, <!-- 蓝图编号 -->
blueprint_name, <!-- 蓝图名称 -->
proj_code, <!-- 项目编码 -->
proj_name, <!-- 项目名称 -->
drawing_code, <!-- 图号 -->
drawing_name, <!-- 图纸名称 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #blueprintId#, #blueprintCode#, #blueprintName#, #projCode#, #projName#, #drawingCode#, #drawingName#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC003A WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC003A
SET
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编号 -->
dep_name = #depName#, <!-- 部门名称 -->
blueprint_id = #blueprintId#, <!-- 蓝图id -->
blueprint_code = #blueprintCode#, <!-- 蓝图编号 -->
blueprint_name = #blueprintName#, <!-- 蓝图名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
drawing_code = #drawingCode#, <!-- 图号 -->
drawing_name = #drawingName#, <!-- 图纸名称 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE id = #id#
</update>
</sqlMap>
<?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">
<sqlMap namespace="HGSC004">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name like ('%$blueprintName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
material_status = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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.HGSC004">
SELECT
id as "id", <!-- 主键 -->
blueprint_id as "blueprintId", <!-- 蓝图id -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编号 -->
dep_name as "depName", <!-- 部门名称 -->
blueprint_code as "blueprintCode", <!-- 蓝图编号 -->
blueprint_name as "blueprintName", <!-- 蓝图名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
material_status as "materialStatus", <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code as "accountCode", <!-- 帐套 -->
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}.HGSC004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC004 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name = #blueprintName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
material_status = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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}.HGSC004 (id, <!-- 主键 -->
blueprint_id, <!-- 蓝图id -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
dep_code, <!-- 部门编号 -->
dep_name, <!-- 部门名称 -->
blueprint_code, <!-- 蓝图编号 -->
blueprint_name, <!-- 蓝图名称 -->
proj_code, <!-- 项目编码 -->
proj_name, <!-- 项目名称 -->
material_status, <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #blueprintId#, #companyCode#, #companyName#, #depCode#, #depName#, #blueprintCode#, #blueprintName#, #projCode#, #projName#, #materialStatus#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC004 WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC004
SET
blueprint_id = #blueprintId#, <!-- 蓝图id -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编号 -->
dep_name = #depName#, <!-- 部门名称 -->
blueprint_code = #blueprintCode#, <!-- 蓝图编号 -->
blueprint_name = #blueprintName#, <!-- 蓝图名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
material_status = #materialStatus#, <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status = #approvalStatus#, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE id = #id#
</update>
<delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGSC004 WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete>
</sqlMap>
......@@ -30,7 +30,7 @@ $(function (){
let template = '';
if (item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id +'\')" >蓝图详情</a>';
+ 'onclick="showDetail(' + item.id +',\''+item.blueprintCode+'\',\''+item.blueprintName+'\',\''+item.companyName+'\')" >蓝图详情</a>';
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateBlueprintStatus(' + item.id + ',1)" >启用</a>';
......@@ -137,14 +137,6 @@ $(function (){
},
onRowClick: function (e) {
},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "工艺流程_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "result",
}
}
}
......@@ -231,10 +223,10 @@ function deactivate() {
/**
* 显示详情
*/
function showDetail(id,factoryCode,flowCode,flowName) {
function showDetail(id,blueprintCode,blueprintName,companyName) {
JSColorbox.open({
href: "HGSC003A?methodName=initLoad&inqu_status-0-parendId=" + id+
"&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-flowName="+flowName+"&inqu_status-0-factoryCode="+factoryCode,
href: "HGSC003A?methodName=initLoad&inqu_status-0-blueprintId=" + id +"&inqu_status-0-blueprintCode="+ blueprintCode
+"&inqu_status-0-blueprintName="+blueprintName+"&inqu_status-0-companyName="+companyName,
title: "<div style='text-align: center;'>蓝图清单详情</div>",
width: "80%",
height: "80%",
......
......@@ -25,7 +25,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
$(function (){
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.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: "operator",
title: "操作",
template: function (item) {
let template = '';
if (item.id){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
}
return template;
}
},
{
field: "companyName",
template: function (item) {
item['companyName'] =$("#inqu_status-0-companyName").val();
return $("#inqu_status-0-companyName").val();
}
},{
field: "blueprintId",
template: function (item) {
item['blueprintId'] =$("#inqu_status-0-blueprintId").val();
return $("#inqu_status-0-blueprintId").val();
}
},{
field: "blueprintCode",
template: function (item) {
item['blueprintCode'] =$("#inqu_status-0-blueprintCode").val();
return $("#inqu_status-0-blueprintCode").val();
}
},{
field: "blueprintName",
template: function (item) {
item['blueprintName'] =$("#inqu_status-0-blueprintName").val();
return $("#inqu_status-0-blueprintName").val();
}
}
],
loadComplete: function(grid) {
},
afterEdit:function (e) {
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {
},
}
}
downKeyUp();
})
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC003A", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 显示详情
*/
function showDetail(id,factoryCode,flowCode,flowName) {
JSColorbox.open({
href: "HGSC003AA?methodName=initLoad&inqu_status-0-parendId=" + id+
"&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-flowName="+flowName+"&inqu_status-0-factoryCode="+factoryCode,
title: "<div style='text-align: center;'>蓝图清单详情</div>",
width: "80%",
height: "80%",
});
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=LTXQ&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="查询条件">
<EF:EFInput ename="inqu_status-0-blueprintId" cname="蓝图id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-blueprintCode" cname="蓝图编号" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-blueprintName" cname="蓝图名称" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3" type="hidden"/>
<div class="row">
<EF:EFInput ename="inqu_status-0-drawingCode" cname="图号" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-drawingName" cname="图纸名称" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintId" cname="蓝图id" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="drawingCode" cname="图号" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="drawingName" cname="图纸名称" enable="true" width="120" align="center" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<!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:EFInput ename="inqu_status-0-blueprintName" cname="蓝图名称" colWidth="3"/>
<EF:EFSelect cname="提交状态" ename="inqu_status-0-materialStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.materialStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" 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="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="materialStatus" cname="提交状态" width="80" align="center" enable="false" required="false" readonly="true">
<EF:EFCodeOption codeName="hggp.sc.materialStatus" />
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<!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}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="物料清单详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-productName" cname="产品名称" colWidth="3"/>
<EF:EFSelect cname="变更类型" ename="inqu_status-0-changeType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.changeType" />
</EF:EFSelect>
<EF:EFSelect cname="提交状态" ename="inqu_status-0-productStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline">
<div id="left-pane" class="i-fit-height" style="width: 20%;float:left;">
<EF:EFRegion id="companyTree" title="BOM结构图" fitHeight="true">
<EF:EFTree id="materialTree"
valueField="label"
textField="text"
hasChildren="leaf"
serviceName="HGSC004A"
methodName="queryTreeNode">
</EF:EFTree>
</EF:EFRegion>
</div>
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="no" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" required="true" cname="产品名称"/>
<EF:EFColumn ename="prdtCode" required="true" cname="产品编码" hidden="true"/>
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/>
<EF:EFComboColumn enable="false" ename="status" align="center"
columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField"
valueField="valueField" cname="审核状态">
<EF:EFOption label="未审核" value="0"></EF:EFOption>
<EF:EFOption label="已审核" value="1"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
</EF:EFPage>
<script>
let ctx="${ctx}";
</script>
<script src="${ctx}/HP/SC/HGSC004A.js"></script>
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