Commit be86a227 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hp-smart into dev-ly

parents 5fcc8dd6 592fef70
......@@ -51,9 +51,9 @@ public class ServiceHPDM099 extends ServiceEPBase {
try {
// 文件存储位置
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
inInfo = super.query(inInfo, "HPDM099.queryS3", new HPXS007A());
inInfo = super.query(inInfo, "HPDM099.queryS3", new HPDM099());
} else {
inInfo = super.query(inInfo, "HPDM099.queryLocal", new HPXS007A());
inInfo = super.query(inInfo, "HPDM099.queryLocal", new HPDM099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
......@@ -16,7 +16,7 @@ import java.util.Map;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-13 13:48:03 create
* @history 2024-08-26 9:29:54 create
*/
public class HPZL004 extends DaoEPBase {
......@@ -34,12 +34,22 @@ public class HPZL004 extends DaoEPBase {
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除*/
public static final String FIELD_RECTIFY_ID = "rectifyId"; /* 整改ID*/
public static final String FIELD_STATUS = "status"; /* 状态,0:待处理;1:处理中;2:已处理*/
public static final String FIELD_PROJ_TYPE = "projType"; /* 项目类型*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_QUALITY_PROBLEM = "qualityProblem"; /* 质量问题*/
public static final String FIELD_PROCESS_SUGGES = "processSugges"; /* 处理意见*/
public static final String FIELD_RECTIFY_SUGGES = "rectifySugges"; /* 整改措施*/
public static final String FIELD_CHECK_BY = "checkBy"; /* 质检人*/
public static final String FIELD_CHECK_NAME = "checkName"; /* 质检人名称*/
public static final String FIELD_CHECK_TIME = "checkTime"; /* 质检时间*/
public static final String FIELD_RESPON_DEP_CODE = "responDepCode"; /* 责任部门编码*/
public static final String FIELD_RESPON_DEP_NAME = "responDepName"; /* 责任部门名称*/
public static final String FIELD_RESPON_USER_ID = "responUserId"; /* 责任人*/
public static final String FIELD_RESPON_USER_NAME = "responUserName"; /* 责任名称*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
......@@ -53,12 +63,22 @@ public class HPZL004 extends DaoEPBase {
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除*/
public static final String COL_RECTIFY_ID = "RECTIFY_ID"; /* 整改ID*/
public static final String COL_STATUS = "STATUS"; /* 状态,0:待处理;1:处理中;2:已处理*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目类型*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_QUALITY_PROBLEM = "QUALITY_PROBLEM"; /* 质量问题*/
public static final String COL_PROCESS_SUGGES = "PROCESS_SUGGES"; /* 处理意见*/
public static final String COL_RECTIFY_SUGGES = "RECTIFY_SUGGES"; /* 整改措施*/
public static final String COL_CHECK_BY = "CHECK_BY"; /* 质检人*/
public static final String COL_CHECK_NAME = "CHECK_NAME"; /* 质检人名称*/
public static final String COL_CHECK_TIME = "CHECK_TIME"; /* 质检时间*/
public static final String COL_RESPON_DEP_CODE = "RESPON_DEP_CODE"; /* 责任部门编码*/
public static final String COL_RESPON_DEP_NAME = "RESPON_DEP_NAME"; /* 责任部门名称*/
public static final String COL_RESPON_USER_ID = "RESPON_USER_ID"; /* 责任人*/
public static final String COL_RESPON_USER_NAME = "RESPON_USER_NAME"; /* 责任名称*/
public static final String QUERY = "HPZL004.query";
public static final String COUNT = "HPZL004.count";
......@@ -77,13 +97,23 @@ public class HPZL004 extends DaoEPBase {
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag; /* 是否删除*/
private String rectifyId = " "; /* 整改ID*/
private Integer status = new Integer(0); /* 状态,0:待处理;1:处理中;2:已处理*/
private Integer status; /* 状态,0:待处理;1:处理中;2:已处理*/
private Integer projType; /* 项目类型*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private Integer prdtType; /* 产品类型*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private String qualityProblem = " "; /* 质量问题*/
private String processSugges = " "; /* 处理意见*/
private String rectifySugges = " "; /* 整改措施*/
private String checkBy = " "; /* 质检人*/
private String checkName = " "; /* 质检人名称*/
private String checkTime = " "; /* 质检时间*/
private String responDepCode = " "; /* 责任部门编码*/
private String responDepName = " "; /* 责任部门名称*/
private String responUserId = " "; /* 责任人*/
private String responUserName = " "; /* 责任名称*/
/**
* initialize the metadata.
......@@ -140,6 +170,30 @@ public class HPZL004 extends DaoEPBase {
eiColumn.setDescName("状态,0:待处理;1:处理中;2:已处理");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_TYPE);
eiColumn.setDescName("项目类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUALITY_PROBLEM);
eiColumn.setDescName("质量问题");
eiMetadata.addMeta(eiColumn);
......@@ -164,6 +218,22 @@ public class HPZL004 extends DaoEPBase {
eiColumn.setDescName("质检时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RESPON_DEP_CODE);
eiColumn.setDescName("责任部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RESPON_DEP_NAME);
eiColumn.setDescName("责任部门名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RESPON_USER_ID);
eiColumn.setDescName("责任人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RESPON_USER_NAME);
eiColumn.setDescName("责任名称");
eiMetadata.addMeta(eiColumn);
}
......@@ -367,6 +437,102 @@ public class HPZL004 extends DaoEPBase {
this.status = status;
}
/**
* get the projType - 项目类型.
* @return the projType
*/
public Integer getProjType() {
return this.projType;
}
/**
* set the projType - 项目类型.
*
* @param projType - 项目类型
*/
public void setProjType(Integer projType) {
this.projType = projType;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the prdtType - 产品类型.
* @return the prdtType
*/
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtType - 产品类型.
*
* @param prdtType - 产品类型
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public String getPrdtCode() {
return this.prdtCode;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtCode(String prdtCode) {
this.prdtCode = prdtCode;
}
/**
* get the prdtName - 产品名称.
* @return the prdtName
*/
public String getPrdtName() {
return this.prdtName;
}
/**
* set the prdtName - 产品名称.
*
* @param prdtName - 产品名称
*/
public void setPrdtName(String prdtName) {
this.prdtName = prdtName;
}
/**
* get the qualityProblem - 质量问题.
* @return the qualityProblem
*/
......@@ -463,6 +629,70 @@ public class HPZL004 extends DaoEPBase {
this.checkTime = checkTime;
}
/**
* get the responDepCode - 责任部门编码.
* @return the responDepCode
*/
public String getResponDepCode() {
return this.responDepCode;
}
/**
* set the responDepCode - 责任部门编码.
*
* @param responDepCode - 责任部门编码
*/
public void setResponDepCode(String responDepCode) {
this.responDepCode = responDepCode;
}
/**
* get the responDepName - 责任部门名称.
* @return the responDepName
*/
public String getResponDepName() {
return this.responDepName;
}
/**
* set the responDepName - 责任部门名称.
*
* @param responDepName - 责任部门名称
*/
public void setResponDepName(String responDepName) {
this.responDepName = responDepName;
}
/**
* get the responUserId - 责任人.
* @return the responUserId
*/
public String getResponUserId() {
return this.responUserId;
}
/**
* set the responUserId - 责任人.
*
* @param responUserId - 责任人
*/
public void setResponUserId(String responUserId) {
this.responUserId = responUserId;
}
/**
* get the responUserName - 责任名称.
* @return the responUserName
*/
public String getResponUserName() {
return this.responUserName;
}
/**
* set the responUserName - 责任名称.
*
* @param responUserName - 责任名称
*/
public void setResponUserName(String responUserName) {
this.responUserName = responUserName;
}
/**
* get the value from Map.
*
* @param map - source data map
......@@ -482,12 +712,22 @@ public class HPZL004 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setRectifyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECTIFY_ID)), rectifyId));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setProjType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PROJ_TYPE)), projType));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setQualityProblem(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_QUALITY_PROBLEM)), qualityProblem));
setProcessSugges(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_SUGGES)), processSugges));
setRectifySugges(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECTIFY_SUGGES)), rectifySugges));
setCheckBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_BY)), checkBy));
setCheckName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_NAME)), checkName));
setCheckTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_TIME)), checkTime));
setResponDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RESPON_DEP_CODE)), responDepCode));
setResponDepName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RESPON_DEP_NAME)), responDepName));
setResponUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RESPON_USER_ID)), responUserId));
setResponUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RESPON_USER_NAME)), responUserName));
}
/**
......@@ -509,12 +749,22 @@ public class HPZL004 extends DaoEPBase {
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_RECTIFY_ID, StringUtils.toString(rectifyId, eiMetadata.getMeta(FIELD_RECTIFY_ID)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_PROJ_TYPE, StringUtils.toString(projType, eiMetadata.getMeta(FIELD_PROJ_TYPE)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_QUALITY_PROBLEM, StringUtils.toString(qualityProblem, eiMetadata.getMeta(FIELD_QUALITY_PROBLEM)));
map.put(FIELD_PROCESS_SUGGES, StringUtils.toString(processSugges, eiMetadata.getMeta(FIELD_PROCESS_SUGGES)));
map.put(FIELD_RECTIFY_SUGGES, StringUtils.toString(rectifySugges, eiMetadata.getMeta(FIELD_RECTIFY_SUGGES)));
map.put(FIELD_CHECK_BY, StringUtils.toString(checkBy, eiMetadata.getMeta(FIELD_CHECK_BY)));
map.put(FIELD_CHECK_NAME, StringUtils.toString(checkName, eiMetadata.getMeta(FIELD_CHECK_NAME)));
map.put(FIELD_CHECK_TIME, StringUtils.toString(checkTime, eiMetadata.getMeta(FIELD_CHECK_TIME)));
map.put(FIELD_RESPON_DEP_CODE, StringUtils.toString(responDepCode, eiMetadata.getMeta(FIELD_RESPON_DEP_CODE)));
map.put(FIELD_RESPON_DEP_NAME, StringUtils.toString(responDepName, eiMetadata.getMeta(FIELD_RESPON_DEP_NAME)));
map.put(FIELD_RESPON_USER_ID, StringUtils.toString(responUserId, eiMetadata.getMeta(FIELD_RESPON_USER_ID)));
map.put(FIELD_RESPON_USER_NAME, StringUtils.toString(responUserName, eiMetadata.getMeta(FIELD_RESPON_USER_NAME)));
return map;
}
......
......@@ -6,10 +6,9 @@ import com.baosight.hpjx.core.enums.HandleStatusEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.dm.constant.HpDmConstant;
import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.dm.tools.HpDmTools;
import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.domain.HPZL004C;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils;
......@@ -17,12 +16,10 @@ import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -109,9 +106,9 @@ public class ServiceHPZL004 extends ServiceBase {
AssertUtils.isEmpty(dbZl004.getRectifySugges(), String.format("整改通知单【%s】的整改措施不能为空!",
dbZl004.getRectifyId()));
// 处理照片不能为空
List<HPDM099> dbDm099s = HpDmTools.HpDm099.list(HpDmConstant.BizType.RECTIFY_HANDLE,
dbZl004.getRectifyId());
AssertUtils.isEmpty(dbDm099s, String.format("整改通知单【%s】还未上传处理照片!",
List<HPZL004C> dbZl004s = HPZLTools.HpZl004c.listById(dbZl004.getRectifyId(),
HpDmConstant.BizType.RECTIFY_HANDLE);
AssertUtils.isEmpty(dbZl004s, String.format("整改通知单【%s】还未上传处理照片!",
dbZl004.getRectifyId()));
}
}
......
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.enums.HandleStatusEnum;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.xs.domain.Org;
import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
......@@ -19,7 +27,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Arrays;
import java.util.Map;
/**
......@@ -42,6 +50,10 @@ public class ServiceHPZL004B extends ServiceEPBase {
try {
// 查询物料信息
this.setQualityInfo(inInfo);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL004().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -75,6 +87,8 @@ public class ServiceHPZL004B extends ServiceEPBase {
public EiInfo save(EiInfo inInfo) {
try {
HPZL004 fZl004 = MapUtils.toDaoEPBase(inInfo, HPZL004.class);
// 填充基础信息
this.setBaseInfo(fZl004);
// 判断是新增还是修改
if (StringUtils.isBlank(fZl004.getRectifyId())) {
addData(fZl004);
......@@ -129,4 +143,31 @@ public class ServiceHPZL004B extends ServiceEPBase {
AssertUtils.isEmpty(fZl004.getProcessSugges(), "处理意见不能为空");
}
/**
* 填充基础信息
*
* @param fZl004
*/
private void setBaseInfo(HPZL004 fZl004) {
// 项目信息
String projCode = fZl004.getProjCode();
HPSC001 dbSc001 = HPSCTools.HpSc001.get(projCode);
fZl004.setProjType(dbSc001.getProjType());
fZl004.setProjName(dbSc001.getProjName());
// 产品信息
String prdtCode = fZl004.getPrdtCode();
HPSC002 dbSc002 = HPSCTools.HpSc002.getByPrdt(prdtCode);
fZl004.setPrdtType(dbSc002.getPrdtType());
fZl004.setPrdtName(dbSc002.getPrdtName());
// 责任部门
String depCode = fZl004.getResponDepCode();
Org dbOrg = HPXSTools.XsOrg.get(depCode);
fZl004.setResponDepCode(dbOrg.getOrgId());
fZl004.setResponDepName(dbOrg.getOrgCname());
// 责任人
String userId = fZl004.getResponUserId();
User user = HPXSTools.XsUser.get(userId);
fZl004.setResponUserName(user.getUserName());
}
}
......@@ -15,12 +15,22 @@
DELETE_FLAG as "deleteFlag", <!-- 是否删除 -->
RECTIFY_ID as "rectifyId", <!-- 整改ID -->
STATUS as "status", <!-- 状态,0:待处理;1:处理中;2:已处理 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
QUALITY_PROBLEM as "qualityProblem", <!-- 质量问题 -->
PROCESS_SUGGES as "processSugges", <!-- 处理意见 -->
RECTIFY_SUGGES as "rectifySugges", <!-- 整改措施 -->
CHECK_BY as "checkBy", <!-- 质检人 -->
CHECK_NAME as "checkName", <!-- 质检人名称 -->
CHECK_TIME as "checkTime" <!-- 质检时间 -->
CHECK_TIME as "checkTime", <!-- 质检时间 -->
RESPON_DEP_CODE as "responDepCode", <!-- 责任部门编码 -->
RESPON_DEP_NAME as "responDepName", <!-- 责任部门名称 -->
RESPON_USER_ID as "responUserId", <!-- 责任人 -->
RESPON_USER_NAME as "responUserName" <!-- 责任名称 -->
</sql>
<sql id="condition">
......@@ -45,6 +55,15 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE CONCAT('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qualityProblem">
QUALITY_PROBLEM = #qualityProblem#
</isNotEmpty>
......@@ -58,7 +77,7 @@
CHECK_BY = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
CHECK_NAME = #checkName#
CHECK_NAME LIKE CONCAT('%', #checkName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkTime">
CHECK_TIME = #checkTime#
......@@ -107,16 +126,30 @@
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除 -->
RECTIFY_ID, <!-- 整改ID -->
STATUS, <!-- 状态,0:待处理;1:处理中;2:已处理 -->
PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
QUALITY_PROBLEM, <!-- 质量问题 -->
PROCESS_SUGGES, <!-- 处理意见 -->
RECTIFY_SUGGES <!-- 整改措施 -->
RECTIFY_SUGGES, <!-- 整改措施 -->
CHECK_BY, <!-- 质检人 -->
CHECK_NAME, <!-- 质检人名称 -->
CHECK_TIME, <!-- 质检时间 -->
RESPON_DEP_CODE, <!-- 责任部门编码 -->
RESPON_DEP_NAME, <!-- 责任部门名称 -->
RESPON_USER_ID, <!-- 责任人 -->
RESPON_USER_NAME <!-- 责任名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #rectifyId#, #status#, #qualityProblem#, #processSugges#,
#rectifySugges#
#rectifyId#, #status#, #projType#, #projCode#, #projName#,
#prdtType#, #prdtCode#, #prdtName#, #qualityProblem#, #processSugges#,
#rectifySugges#, #checkBy#, #checkName#, #checkTime#, #responDepCode#,
#responDepName#, #responUserId#, #responUserName#
)
</insert>
......@@ -139,9 +172,19 @@
<update id="update">
UPDATE ${hpjxSchema}.T_HPZL004
SET
PROJ_TYPE = #projType#, <!-- 项目类型 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
QUALITY_PROBLEM = #qualityProblem#, <!-- 质量问题 -->
PROCESS_SUGGES = #processSugges#, <!-- 处理意见 -->
RECTIFY_SUGGES = #rectifySugges#, <!-- 整改措施 -->
RESPON_DEP_CODE = #responDepCode#, <!-- 责任部门编码 -->
RESPON_DEP_NAME = #responDepName#, <!-- 责任部门名称 -->
RESPON_USER_ID = #responUserId#, <!-- 责任人 -->
RESPON_USER_NAME = #responUserName#, <!-- 责任名称 -->
<include refid="SqlBase.updateRevise"/>
WHERE RECTIFY_ID = #rectifyId#
</update>
......
......@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.domain.HPZL004C;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.StringUtils;
import org.apache.commons.collections.CollectionUtils;
......@@ -11,7 +12,6 @@ import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
......@@ -128,4 +128,28 @@ public class HPZLTools {
}
/**
* @author:songx
* @date:2024/8/26,10:30
*/
public static class HpZl004c {
/**
* 查询
*
* @param rectifyId
* @param bizType
* @return
*/
public static List<HPZL004C> listById(String rectifyId, String bizType) {
AssertUtils.isEmpty(rectifyId, "ID不能为空");
AssertUtils.isEmpty(bizType, "类型不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put(HPZL004C.FIELD_RECTIFY_ID, rectifyId);
paramMap.put(HPZL004C.FIELD_RECTIFY_TYPE, bizType);
return DaoBase.getInstance().query(HPZL004C.QUERY, paramMap);
}
}
}
......@@ -39,7 +39,7 @@ public class HpZlUtils {
* @return
*/
public static Map<String, HPZL004> lockGetDataEp(List<? extends HPZL004> zl004s) {
return lockGetData(ObjectUtils.listEpKey(zl004s, HPZL004.FIELD_ID));
return lockGetData(ObjectUtils.listEpKey(zl004s, HPZL004.FIELD_RECTIFY_ID));
}
/**
......
......@@ -156,7 +156,6 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
return resultMap;
}
/**
* map 转 DaoEPBase
*
......
......@@ -69,6 +69,7 @@ function uploadFileCallback(res) {
inEiInfo.set("result-0-bizId", $("#inqu_status-0-bizId").val());
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
inEiInfo.set("result-0-docId", res.docId);
inEiInfo.set("result-0-docName", res.docName);
EiCommunicator.send('HPDM099', 'upload', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
......
......@@ -10,15 +10,14 @@
<div class="row">
<EF:EFInput ename="projCode" cname="项目编号" blockId="inqu_status" row="0" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="projName" cname="项目名称" blockId="inqu_status" row="0" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="productName" cname="产品名称" blockId="inqu_status" row="0" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect cname="处理状态" ename="handleStatus" blockId="inqu_status" row="0" colWidth="3">
<EF:EFInput ename="prdtName" cname="产品名称" blockId="inqu_status" row="0" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect ename="status" cname="处理状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpzl.handleStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="checkName" cname="处理人" blockId="inqu_status" row="0" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="checkName" cname="质检人" blockId="inqu_status" row="0" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
......@@ -31,15 +30,20 @@
<EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="rectifyId" cname="单据ID" enable="false" width="130" align="center"/>
<EF:EFColumn ename="createdTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" enable="true" width="120" align="center" readOnly="true"/>
parseFormats="['yyyyMMdd']" enable="false" width="120" align="center" readOnly="true"/>
<EF:EFComboColumn ename="status" cname="处理状态" width="80" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpzl.handleStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="qualityProblem" cname="质量问题描述" enable="true" width="130" align="center"/>
<EF:EFColumn ename="processSugges" cname="处理意见" enable="true" width="130" align="center"/>
<EF:EFColumn ename="rectifySugges" cname="整改措施" enable="true" width="130" align="center"/>
<EF:EFColumn ename="checkName" cname="处理人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="checkTime" cname="处理时间" enable="true" width="140" align="center" editType="datetime"
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="130" align="left"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="left"/>
<EF:EFColumn ename="prdtName" cname="产品名称" enable="false" width="130" align="left"/>
<EF:EFColumn ename="qualityProblem" cname="质量问题描述" enable="false" width="130" align="center"/>
<EF:EFColumn ename="processSugges" cname="处理意见" enable="false" width="130" align="center"/>
<EF:EFColumn ename="rectifySugges" cname="整改措施" enable="false" width="130" align="center"/>
<EF:EFColumn ename="responDepName" cname="责任部门" enable="false" width="130" align="left"/>
<EF:EFColumn ename="responUserName" cname="责任人" enable="false" width="130" align="left"/>
<EF:EFColumn ename="checkName" cname="质检人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="checkTime" cname="质检时间" enable="false" width="140" align="center" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" parseFormats="['yyyyMMddHHmmss']" readOnly="true"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -52,6 +52,14 @@ let save = function () {
* 参数校验
*/
let checkParams = function () {
let projCode = $("#result-0-projCode").val();
if (isBlank(projCode)) {
return "项目名称不能为空";
}
let prdtCode = $("#result-0-prdtCode").val();
if (isBlank(prdtCode)) {
return "产品名称不能为空";
}
let qualityProblem = $("#result-0-qualityProblem").val();
if (isBlank(qualityProblem)) {
return "质量问题不能为空";
......@@ -64,5 +72,13 @@ let checkParams = function () {
if (isBlank(rectifySugges)) {
return "整改措施不能为空";
}
let responDepCode = $("#result-0-responDepCode").val();
if (isBlank(responDepCode)) {
return "责任部门不能为空";
}
let responUserId = $("#result-0-responUserId").val();
if (isBlank(responUserId)) {
return "责任人不能为空";
}
return null;
}
......@@ -12,6 +12,20 @@
readonly="true"/>
</div>
<div class="row">
<EF:EFSelect cname="项目名称" blockId="result" ename="projCode" row="0" colWidth="3" ratio="2:10"
required="true" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="产品名称" blockId="result" ename="prdtCode" row="0" colWidth="3" ratio="2:10"
required="true" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput cname="质量问题" blockId="result" ename="qualityProblem" row="0" colWidth="6" ratio="2:10"
required="true" type="textarea" rows="4" maxLength="500"/>
</div>
......@@ -23,6 +37,20 @@
<EF:EFInput cname="整改措施" blockId="result" ename="rectifySugges" row="0" colWidth="6" ratio="2:10"
required="true" type="textarea" rows="4" maxLength="500"/>
</div>
<div class="row">
<EF:EFSelect cname="责任部门" blockId="result" ename="responDepCode" row="0" colWidth="3" ratio="2:10"
required="true" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="org_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="责任人" blockId="result" ename="responUserId" row="0" colWidth="3" ratio="2:10"
required="true" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<br/>
<span style="color: red; ">说明:单据ID由系统自动生成</span><br>
</EF:EFRegion>
......
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