Commit c5f6d661 by 江和松

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

# Conflicts:
#	src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
parents fdca1196 620bdbbe
package com.baosight.hggp.common;
/**
* @author wwl
* @version 1.0 2024/5/21
*/
public enum CheckTypeEnum {
PROCESS_CHECK(1,"工序质检单"),
POLLING_CHECK(2,"日常巡检单");
private Integer code;
private String value;
CheckTypeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public static CheckTypeEnum getEnumByCode(Integer code){
for (CheckTypeEnum en : CheckTypeEnum.values()){
if(code.compareTo(en.code)==0){
return en;
}
}
return null;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.baosight.hggp.common;
/**
* @author wwl
* @version 1.0 2024/5/21
*/
public enum HandleStatusEnum {
UNPROCESS(0,"待处理"),
processing(1,"处理中"),
processed(1,"已处理");
private Integer code;
private String value;
HandleStatusEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public static HandleStatusEnum getEnumByCode(Integer code){
for (HandleStatusEnum en : HandleStatusEnum.values()){
if(code.compareTo(en.code)==0){
return en;
}
}
return null;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
......@@ -291,4 +291,15 @@ public class HGConstant {
public static final Integer TK = 2;
}
/**
* 文件类型*
*/
public static class FileBizType {
//项目人员
public static final String XMRY = "XMRY";
//质检问题照片
public static final String CHECK_DEFECT = "CHECK_DEFECT";
//质检问题处理照片
public static final String CHECK_HANDLE = "CHECK_HANDLE";
}
}
......@@ -103,7 +103,7 @@ public class HGKC004A extends DaoEPBase {
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private BigDecimal quantity = new BigDecimal(0.000); /* 数量*/
private BigDecimal quantity = new BigDecimal(0); /* 数量*/
private BigDecimal unitWeight = new BigDecimal(0.000); /* 单重*/
private BigDecimal weight = new BigDecimal(0.000); /* 重量*/
private Long parentId = new Long(0); /* 销售出库单ID*/
......@@ -208,7 +208,7 @@ public class HGKC004A extends DaoEPBase {
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
......
......@@ -83,7 +83,7 @@ public class ServiceHGKC004 extends ServiceEPBase {
hgkc004.fromMap(resultRow);
if (hgkc004.getId() == null || hgkc004.getId() == 0) {
this.add(hgkc004);
List<HGKC004> list = this.dao.query(HGKC004A.QUERY,hgkc004);
List<HGKC004> list = this.dao.query("HGKC004.queryList",hgkc004.toMap());
if (CollectionUtils.isEmpty(list)){
throw new PlatException("保存失败,请刷新后重试!");
}
......
......@@ -254,6 +254,58 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, INVENT_CODE, SUB_INVENT_CODE,FACTORY_CODE,FACTORY_NAME
</select>
<select id="queryList" parameterClass="HashMap" resultClass="HGKC004">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC004 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="saleOutCode">
SALE_OUT_CODE = #saleOutCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
RECEIPT_DATE DESC,CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......
......@@ -150,7 +150,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
RECEIPT_DATE desc, ID asc
RECEIPT_DATE desc, CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
......
......@@ -4,8 +4,10 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
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.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC002;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sc.util.HGSCUtil;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
......@@ -53,14 +55,19 @@ public class ServiceHGSC002 extends ServiceBase {
return inInfo;
}
@Override
@OperationLogAnnotation(operModul = "项目人员", operType = "删除", operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC002.FIELD_id);
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC002.FIELD_id).stream().map(id -> Long.parseLong(String.valueOf(id))).collect(Collectors.toList());
DaoUtils.update(HGSC002.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
ids.forEach( id -> {
HGSCTools.THGSC099.deleteByMatId(id, HGConstant.FileBizType.XMRY);
});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......
......@@ -4,6 +4,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
......@@ -97,7 +98,7 @@ public class ServiceHGSC099 extends ServiceEPBase {
hgsc099.fromMap(resultRows.get(i));
DaoUtils.update(HGSC099.DELETE, hgsc099);
if (!hgsc099.getDocId().isEmpty()) {
this.delectDoc(hgsc099.getDocId());
HGSCTools.THGSC099.delectDoc(hgsc099.getDocId());
}
}
inInfo = this.query(inInfo);
......@@ -109,43 +110,5 @@ public class ServiceHGSC099 extends ServiceEPBase {
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
}
......@@ -11,6 +11,7 @@ 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.constant.HGSqlConstant;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
......@@ -19,14 +20,14 @@ import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.DateUtil;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
......@@ -819,6 +820,76 @@ public class HGSCTools {
}
}
}
public static class THGSC099{
public static List<HGSC099> listByMatId(Long matId, String bizType) {
Map queryMap = new HashMap();
queryMap.put(HGSC099.FIELD_mat_id, matId);
queryMap.put(HGSC099.FIELD_biz_type, bizType);
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
return DaoBase.getInstance().query("HGSC099.queryRun", queryMap);
} else {
return DaoBase.getInstance().query("HGSC099.queryDev", queryMap);
}
}
public static void deleteByMatId(Long matId, String bizType){
List<HGSC099> hgsc099List = listByMatId(matId,bizType);
for (int i = 0; i < hgsc099List.size(); i++) {
HGSC099 hgsc099 = hgsc099List.get(i);
DaoUtils.update(HGSC099.DELETE, hgsc099);
if (!hgsc099.getDocId().isEmpty()) {
delectDoc(hgsc099.getDocId());
}
}
}
/**
* 删除文件
* @param docId 文件ID
*/
public static void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = DaoBase.getInstance().query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGSC099.FIELD_doc_id,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
DaoBase.getInstance().delete(HGDS002.DELETE,map);
}
}
}
}
......@@ -52,8 +52,8 @@ public class HGZL002 extends DaoEPBase {
public static final String FIELD_work_by = "workBy"; /* 生产人*/
public static final String FIELD_work_name = "workName"; /* 生产人名称*/
public static final String FIELD_quantity = "quantity"; /* 数量*/
public static final String FIELD_passQuantity = "passquantity"; /* 合格数量*/
public static final String FIELD_unpassQuantity = "unpassquantity"; /* 不合格数量*/
public static final String FIELD_pass_quantity = "passQuantity"; /* 合格数量*/
public static final String FIELD_unpass_quantity = "unpassQuantity"; /* 不合格数量*/
public static final String FIELD_single_weight = "singleWeight"; /* 单重*/
public static final String FIELD_total_weight = "totalWeight"; /* 总重*/
public static final String FIELD_check_by = "checkBy"; /* 质检人*/
......@@ -97,8 +97,8 @@ public class HGZL002 extends DaoEPBase {
public static final String COL_work_by = "work_by"; /* 生产人*/
public static final String COL_work_name = "work_name"; /* 生产人名称*/
public static final String COL_quantity = "quantity"; /* 数量*/
public static final String COL_passQuantity = "passQuantity"; /* 合格数量*/
public static final String COL_unpassQuantity = "unpassQuantity"; /* 不合格数量*/
public static final String COL_pass_quantity = "pass_quantity"; /* 合格数量*/
public static final String COL_unpass_quantity = "unpass_quantity"; /* 不合格数量*/
public static final String COL_single_weight = "single_weight"; /* 单重*/
public static final String COL_total_weight = "total_weight"; /* 总重*/
public static final String COL_check_by = "check_by"; /* 质检人*/
......@@ -150,8 +150,8 @@ public class HGZL002 extends DaoEPBase {
private String workBy = " "; /* 生产人*/
private String workName = " "; /* 生产人名称*/
private Integer quantity = new Integer(0); /* 数量*/
private Integer passquantity = new Integer(0); /* 合格数量*/
private Integer unpassquantity = new Integer(0); /* 不合格数量*/
private Integer passQuantity = new Integer(0); /* 合格数量*/
private Integer unpassQuantity = new Integer(0); /* 不合格数量*/
private BigDecimal singleWeight = new BigDecimal("0"); /* 单重*/
private BigDecimal totalWeight = new BigDecimal("0"); /* 总重*/
private String checkBy = " "; /* 质检人*/
......@@ -289,11 +289,11 @@ public class HGZL002 extends DaoEPBase {
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_passQuantity);
eiColumn = new EiColumn(FIELD_pass_quantity);
eiColumn.setDescName("合格数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_unpassQuantity);
eiColumn = new EiColumn(FIELD_unpass_quantity);
eiColumn.setDescName("不合格数量");
eiMetadata.addMeta(eiColumn);
......@@ -830,36 +830,36 @@ public class HGZL002 extends DaoEPBase {
this.quantity = quantity;
}
/**
* get the passquantity - 合格数量.
* @return the passquantity
* get the passQuantity - 合格数量.
* @return the passQuantity
*/
public Integer getPassquantity() {
return this.passquantity;
public Integer getPassQuantity() {
return this.passQuantity;
}
/**
* set the passquantity - 合格数量.
* set the passQuantity - 合格数量.
*
* @param passquantity - 合格数量
* @param passQuantity - 合格数量
*/
public void setPassquantity(Integer passquantity) {
this.passquantity = passquantity;
public void setPassQuantity(Integer passQuantity) {
this.passQuantity = passQuantity;
}
/**
* get the unpassquantity - 不合格数量.
* @return the unpassquantity
* get the unpassQuantity - 不合格数量.
* @return the unpassQuantity
*/
public Integer getUnpassquantity() {
return this.unpassquantity;
public Integer getUnpassQuantity() {
return this.unpassQuantity;
}
/**
* set the unpassquantity - 不合格数量.
* set the unpassQuantity - 不合格数量.
*
* @param unpassquantity - 不合格数量
* @param unpassQuantity - 不合格数量
*/
public void setUnpassquantity(Integer unpassquantity) {
this.unpassquantity = unpassquantity;
public void setUnpassQuantity(Integer unpassQuantity) {
this.unpassQuantity = unpassQuantity;
}
/**
* get the singleWeight - 单重.
......@@ -1106,8 +1106,8 @@ public class HGZL002 extends DaoEPBase {
setWorkBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_work_by)), workBy));
setWorkName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_work_name)), workName));
setQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_quantity)), quantity));
setPassquantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_passQuantity)), passquantity));
setUnpassquantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_unpassQuantity)), unpassquantity));
setPassQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_pass_quantity)), passQuantity));
setUnpassQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_unpass_quantity)), unpassQuantity));
setSingleWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_single_weight)), singleWeight));
setTotalWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_total_weight)), totalWeight));
setCheckBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_check_by)), checkBy));
......@@ -1159,8 +1159,8 @@ public class HGZL002 extends DaoEPBase {
map.put(FIELD_work_by, StringUtils.toString(workBy, eiMetadata.getMeta(FIELD_work_by)));
map.put(FIELD_work_name, StringUtils.toString(workName, eiMetadata.getMeta(FIELD_work_name)));
map.put(FIELD_quantity, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_quantity)));
map.put(FIELD_passQuantity, StringUtils.toString(passquantity, eiMetadata.getMeta(FIELD_passQuantity)));
map.put(FIELD_unpassQuantity, StringUtils.toString(unpassquantity, eiMetadata.getMeta(FIELD_unpassQuantity)));
map.put(FIELD_pass_quantity, StringUtils.toString(passQuantity, eiMetadata.getMeta(FIELD_pass_quantity)));
map.put(FIELD_unpass_quantity, StringUtils.toString(unpassQuantity, eiMetadata.getMeta(FIELD_unpass_quantity)));
map.put(FIELD_single_weight, StringUtils.toString(singleWeight, eiMetadata.getMeta(FIELD_single_weight)));
map.put(FIELD_total_weight, StringUtils.toString(totalWeight, eiMetadata.getMeta(FIELD_total_weight)));
map.put(FIELD_check_by, StringUtils.toString(checkBy, eiMetadata.getMeta(FIELD_check_by)));
......
package com.baosight.hggp.hg.zl.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:HGZL004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-31 14:53:27 create
*/
public class HGZL004 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id";
public static final String FIELD_check_id = "checkId"; /* 质检单ID*/
public static final String FIELD_company_code = "companyCode"; /* 公司编码*/
public static final String FIELD_company_name = "companyName"; /* 公司名称*/
public static final String FIELD_dep_code = "depCode"; /* 部门编码*/
public static final String FIELD_dep_name = "depName"; /* 部门名称*/
public static final String FIELD_proj_code = "projCode"; /* 项目编码*/
public static final String FIELD_proj_name = "projName"; /* 项目名称*/
public static final String FIELD_handle_status = "handleStatus"; /* 处理状态 0:待处理;1:处理中;2:已处理*/
public static final String FIELD_process_sugges = "processSugges"; /* 处理意见*/
public static final String FIELD_rectificat_sugges = "rectificatSugges"; /* 整改措施*/
public static final String FIELD_check_type = "checkType"; /* 质检单类型 1:工序质检单;2:日常巡检单*/
public static final String FIELD_check_code = "checkCode"; /* 质检单编码*/
public static final String FIELD_product_type = "productType"; /* 产品类型*/
public static final String FIELD_product_code = "productCode"; /* 产品编号*/
public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_factory_code = "factoryCode"; /* 工厂编号*/
public static final String FIELD_factory_name = "factoryName"; /* 工厂名称*/
public static final String FIELD_group_code = "groupCode"; /* 工作组编号*/
public static final String FIELD_group_name = "groupName"; /* 工作组名称*/
public static final String FIELD_work_by = "workBy"; /* 生产人*/
public static final String FIELD_work_name = "workName"; /* 生产人名称*/
public static final String FIELD_check_by = "checkBy"; /* 质检人*/
public static final String FIELD_check_name = "checkName"; /* 质检人名称*/
public static final String FIELD_account_code = "accountCode"; /* 帐套*/
public static final String FIELD_created_by = "createdBy"; /* 创建人*/
public static final String FIELD_created_name = "createdName"; /* 创建人名称*/
public static final String FIELD_created_time = "createdTime"; /* 创建时间*/
public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/
public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/
public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/
public static final String COL_id = "id";
public static final String COL_check_id = "check_id"; /* 质检单ID*/
public static final String COL_company_code = "company_code"; /* 公司编码*/
public static final String COL_company_name = "company_name"; /* 公司名称*/
public static final String COL_dep_code = "dep_code"; /* 部门编码*/
public static final String COL_dep_name = "dep_name"; /* 部门名称*/
public static final String COL_proj_code = "proj_code"; /* 项目编码*/
public static final String COL_proj_name = "proj_name"; /* 项目名称*/
public static final String COL_handle_status = "handle_status"; /* 处理状态 0:待处理;1:处理中;2:已处理*/
public static final String COL_process_sugges = "process_sugges"; /* 处理意见*/
public static final String COL_rectificat_sugges = "rectificat_sugges"; /* 整改措施*/
public static final String COL_check_type = "check_type"; /* 质检单类型 1:工序质检单;2:日常巡检单*/
public static final String COL_check_code = "check_code"; /* 质检单编码*/
public static final String COL_product_type = "product_type"; /* 产品类型*/
public static final String COL_product_code = "product_code"; /* 产品编号*/
public static final String COL_product_name = "product_name"; /* 产品名称*/
public static final String COL_factory_code = "factory_code"; /* 工厂编号*/
public static final String COL_factory_name = "factory_name"; /* 工厂名称*/
public static final String COL_group_code = "group_code"; /* 工作组编号*/
public static final String COL_group_name = "group_name"; /* 工作组名称*/
public static final String COL_work_by = "work_by"; /* 生产人*/
public static final String COL_work_name = "work_name"; /* 生产人名称*/
public static final String COL_check_by = "check_by"; /* 质检人*/
public static final String COL_check_name = "check_name"; /* 质检人名称*/
public static final String COL_account_code = "account_code"; /* 帐套*/
public static final String COL_created_by = "created_by"; /* 创建人*/
public static final String COL_created_name = "created_name"; /* 创建人名称*/
public static final String COL_created_time = "created_time"; /* 创建时间*/
public static final String COL_updated_by = "updated_by"; /* 更新人*/
public static final String COL_updated_name = "updated_name"; /* 修改人名称*/
public static final String COL_updated_time = "updated_time"; /* 更新时间*/
public static final String QUERY = "HGZL004.query";
public static final String COUNT = "HGZL004.count";
public static final String INSERT = "HGZL004.insert";
public static final String UPDATE = "HGZL004.update";
public static final String DELETE = "HGZL004.delete";
public static final String DELETE_BY_IDS = "HGZL004.deleteByIds";
private Long id = new Long(0);
private Long checkId = new Long(0); /* 质检单ID*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编码*/
private String depName = " "; /* 部门名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private Integer handleStatus = new Integer(0); /* 处理状态 0:待处理;1:处理中;2:已处理*/
private String processSugges = " "; /* 处理意见*/
private String rectificatSugges = " "; /* 整改措施*/
private Integer checkType = new Integer(0); /* 质检单类型 1:工序质检单;2:日常巡检单*/
private String checkCode = " "; /* 质检单编码*/
private Integer productType = new Integer(0); /* 产品类型*/
private String productCode = " "; /* 产品编号*/
private String productName = " "; /* 产品名称*/
private String factoryCode = " "; /* 工厂编号*/
private String factoryName = " "; /* 工厂名称*/
private String groupCode = " "; /* 工作组编号*/
private String groupName = " "; /* 工作组名称*/
private String workBy = " "; /* 生产人*/
private String workName = " "; /* 生产人名称*/
private String checkBy = " "; /* 质检人*/
private String checkName = " "; /* 质检人名称*/
private String accountCode = " "; /* 帐套*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_id);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_check_id);
eiColumn.setDescName("质检单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_code);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_name);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_code);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_name);
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_handle_status);
eiColumn.setDescName("处理状态 0:待处理;1:处理中;2:已处理");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_process_sugges);
eiColumn.setDescName("处理意见");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_rectificat_sugges);
eiColumn.setDescName("整改措施");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_check_type);
eiColumn.setDescName("质检单类型 1:工序质检单;2:日常巡检单");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_check_code);
eiColumn.setDescName("质检单编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_type);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_code);
eiColumn.setDescName("产品编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_name);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_factory_code);
eiColumn.setDescName("工厂编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_factory_name);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_group_code);
eiColumn.setDescName("工作组编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_group_name);
eiColumn.setDescName("工作组名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_work_by);
eiColumn.setDescName("生产人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_work_name);
eiColumn.setDescName("生产人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_check_by);
eiColumn.setDescName("质检人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_check_name);
eiColumn.setDescName("质检人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_account_code);
eiColumn.setDescName("帐套");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_by);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_name);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_time);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_by);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_name);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_time);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGZL004() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the checkId - 质检单ID.
* @return the checkId
*/
public Long getCheckId() {
return this.checkId;
}
/**
* set the checkId - 质检单ID.
*
* @param checkId - 质检单ID
*/
public void setCheckId(Long checkId) {
this.checkId = checkId;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the depName - 部门名称.
* @return the depName
*/
public String getDepName() {
return this.depName;
}
/**
* set the depName - 部门名称.
*
* @param depName - 部门名称
*/
public void setDepName(String depName) {
this.depName = depName;
}
/**
* 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 handleStatus - 处理状态 0:待处理;1:处理中;2:已处理.
* @return the handleStatus
*/
public Integer getHandleStatus() {
return this.handleStatus;
}
/**
* set the handleStatus - 处理状态 0:待处理;1:处理中;2:已处理.
*
* @param handleStatus - 处理状态 0:待处理;1:处理中;2:已处理
*/
public void setHandleStatus(Integer handleStatus) {
this.handleStatus = handleStatus;
}
/**
* get the processSugges - 处理意见.
* @return the processSugges
*/
public String getProcessSugges() {
return this.processSugges;
}
/**
* set the processSugges - 处理意见.
*
* @param processSugges - 处理意见
*/
public void setProcessSugges(String processSugges) {
this.processSugges = processSugges;
}
/**
* get the rectificatSugges - 整改措施.
* @return the rectificatSugges
*/
public String getRectificatSugges() {
return this.rectificatSugges;
}
/**
* set the rectificatSugges - 整改措施.
*
* @param rectificatSugges - 整改措施
*/
public void setRectificatSugges(String rectificatSugges) {
this.rectificatSugges = rectificatSugges;
}
/**
* get the checkType - 质检单类型 1:工序质检单;2:日常巡检单.
* @return the checkType
*/
public Integer getCheckType() {
return this.checkType;
}
/**
* set the checkType - 质检单类型 1:工序质检单;2:日常巡检单.
*
* @param checkType - 质检单类型 1:工序质检单;2:日常巡检单
*/
public void setCheckType(Integer checkType) {
this.checkType = checkType;
}
/**
* get the checkCode - 质检单编码.
* @return the checkCode
*/
public String getCheckCode() {
return this.checkCode;
}
/**
* set the checkCode - 质检单编码.
*
* @param checkCode - 质检单编码
*/
public void setCheckCode(String checkCode) {
this.checkCode = checkCode;
}
/**
* get the productType - 产品类型.
* @return the productType
*/
public Integer getProductType() {
return this.productType;
}
/**
* set the productType - 产品类型.
*
* @param productType - 产品类型
*/
public void setProductType(Integer productType) {
this.productType = productType;
}
/**
* get the productCode - 产品编号.
* @return the productCode
*/
public String getProductCode() {
return this.productCode;
}
/**
* set the productCode - 产品编号.
*
* @param productCode - 产品编号
*/
public void setProductCode(String productCode) {
this.productCode = productCode;
}
/**
* get the productName - 产品名称.
* @return the productName
*/
public String getProductName() {
return this.productName;
}
/**
* set the productName - 产品名称.
*
* @param productName - 产品名称
*/
public void setProductName(String productName) {
this.productName = productName;
}
/**
* get the factoryCode - 工厂编号.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编号.
*
* @param factoryCode - 工厂编号
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the groupCode - 工作组编号.
* @return the groupCode
*/
public String getGroupCode() {
return this.groupCode;
}
/**
* set the groupCode - 工作组编号.
*
* @param groupCode - 工作组编号
*/
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
}
/**
* get the groupName - 工作组名称.
* @return the groupName
*/
public String getGroupName() {
return this.groupName;
}
/**
* set the groupName - 工作组名称.
*
* @param groupName - 工作组名称
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
* get the workBy - 生产人.
* @return the workBy
*/
public String getWorkBy() {
return this.workBy;
}
/**
* set the workBy - 生产人.
*
* @param workBy - 生产人
*/
public void setWorkBy(String workBy) {
this.workBy = workBy;
}
/**
* get the workName - 生产人名称.
* @return the workName
*/
public String getWorkName() {
return this.workName;
}
/**
* set the workName - 生产人名称.
*
* @param workName - 生产人名称
*/
public void setWorkName(String workName) {
this.workName = workName;
}
/**
* get the checkBy - 质检人.
* @return the checkBy
*/
public String getCheckBy() {
return this.checkBy;
}
/**
* set the checkBy - 质检人.
*
* @param checkBy - 质检人
*/
public void setCheckBy(String checkBy) {
this.checkBy = checkBy;
}
/**
* get the checkName - 质检人名称.
* @return the checkName
*/
public String getCheckName() {
return this.checkName;
}
/**
* set the checkName - 质检人名称.
*
* @param checkName - 质检人名称
*/
public void setCheckName(String checkName) {
this.checkName = checkName;
}
/**
* get the accountCode - 帐套.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 帐套.
*
* @param accountCode - 帐套
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_id)), id));
setCheckId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_check_id)), checkId));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode));
setDepName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_name)), depName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name)), projName));
setHandleStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_handle_status)), handleStatus));
setProcessSugges(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_process_sugges)), processSugges));
setRectificatSugges(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_rectificat_sugges)), rectificatSugges));
setCheckType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_check_type)), checkType));
setCheckCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_check_code)), checkCode));
setProductType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_product_type)), productType));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_code)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_name)), productName));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_factory_code)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_factory_name)), factoryName));
setGroupCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_group_code)), groupCode));
setGroupName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_group_name)), groupName));
setWorkBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_work_by)), workBy));
setWorkName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_work_name)), workName));
setCheckBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_check_by)), checkBy));
setCheckName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_check_name)), checkName));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_account_code)), accountCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_created_by)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_created_name)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_created_time)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_id, StringUtils.toString(id, eiMetadata.getMeta(FIELD_id)));
map.put(FIELD_check_id, StringUtils.toString(checkId, eiMetadata.getMeta(FIELD_check_id)));
map.put(FIELD_company_code, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_company_code)));
map.put(FIELD_company_name, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_company_name)));
map.put(FIELD_dep_code, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_dep_code)));
map.put(FIELD_dep_name, StringUtils.toString(depName, eiMetadata.getMeta(FIELD_dep_name)));
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_handle_status, StringUtils.toString(handleStatus, eiMetadata.getMeta(FIELD_handle_status)));
map.put(FIELD_process_sugges, StringUtils.toString(processSugges, eiMetadata.getMeta(FIELD_process_sugges)));
map.put(FIELD_rectificat_sugges, StringUtils.toString(rectificatSugges, eiMetadata.getMeta(FIELD_rectificat_sugges)));
map.put(FIELD_check_type, StringUtils.toString(checkType, eiMetadata.getMeta(FIELD_check_type)));
map.put(FIELD_check_code, StringUtils.toString(checkCode, eiMetadata.getMeta(FIELD_check_code)));
map.put(FIELD_product_type, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_product_type)));
map.put(FIELD_product_code, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_product_code)));
map.put(FIELD_product_name, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_product_name)));
map.put(FIELD_factory_code, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_factory_code)));
map.put(FIELD_factory_name, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_factory_name)));
map.put(FIELD_group_code, StringUtils.toString(groupCode, eiMetadata.getMeta(FIELD_group_code)));
map.put(FIELD_group_name, StringUtils.toString(groupName, eiMetadata.getMeta(FIELD_group_name)));
map.put(FIELD_work_by, StringUtils.toString(workBy, eiMetadata.getMeta(FIELD_work_by)));
map.put(FIELD_work_name, StringUtils.toString(workName, eiMetadata.getMeta(FIELD_work_name)));
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_account_code, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_account_code)));
map.put(FIELD_created_by, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_created_by)));
map.put(FIELD_created_name, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_created_name)));
map.put(FIELD_created_time, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_created_time)));
map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by)));
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)));
return map;
}
}
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.CheckStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
import com.baosight.hggp.util.*;
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.List;
/**
* @author wwl
* @date 2025年05月29日 17:18
*/
public class ServiceHGZL002 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "工序质检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL002.QUERY, new HGZL002());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "工序质检单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL002.QUERY, new HGZL002());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "工序质检单", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class);
hgzl002List.forEach( o -> {
o.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
DaoUtils.update(HGZL002.UPDATE,o);
HGZLTools.THGZL004.addByHGZL002(o);
});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl002List.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
}
......@@ -33,8 +33,8 @@
work_by VARCHAR,
work_name VARCHAR,
quantity TINYINT,
passQuantity TINYINT,
unpassQuantity TINYINT,
pass_quantity TINYINT,
unpass_quantity TINYINT,
single_weight DECIMAL,
total_weight DECIMAL,
check_by VARCHAR,
......@@ -83,7 +83,7 @@
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
......@@ -101,7 +101,7 @@
work_code = #workCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkCode">
check_code = #checkCode#
check_code like ('%$checkCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
product_type = #productType#
......@@ -139,11 +139,11 @@
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="passquantity">
passQuantity = #passquantity#
<isNotEmpty prepend=" AND " property="passQuantity">
pass_quantity = #passQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unpassquantity">
unpassQuantity = #unpassquantity#
<isNotEmpty prepend=" AND " property="unpassQuantity">
unpass_quantity = #unpassQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
......@@ -155,7 +155,7 @@
check_by = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
check_name = #checkName#
check_name like ('%$checkName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkDate">
check_date = #checkDate#
......@@ -187,6 +187,12 @@
<isNotEmpty prepend=" AND " property="workIds">
work_id IN <iterate close=")" open="(" conjunction="," property="workIds">#workIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkDateFrom">
check_date &gt;= #checkDateFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkDateTo">
check_date &lt;= #checkDateTo#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -221,8 +227,8 @@
work_by as "workBy", <!-- 生产人 -->
work_name as "workName", <!-- 生产人名称 -->
quantity as "quantity", <!-- 数量 -->
passQuantity as "passquantity", <!-- 合格数量 -->
unpassQuantity as "unpassquantity", <!-- 不合格数量 -->
pass_quantity as "passQuantity", <!-- 合格数量 -->
unpass_quantity as "unpassQuantity", <!-- 不合格数量 -->
single_weight as "singleWeight", <!-- 单重 -->
total_weight as "totalWeight", <!-- 总重 -->
check_by as "checkBy", <!-- 质检人 -->
......@@ -342,11 +348,11 @@
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="passquantity">
passQuantity = #passquantity#
<isNotEmpty prepend=" AND " property="passQuantity">
pass_quantity = #passQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unpassquantity">
unpassQuantity = #unpassquantity#
<isNotEmpty prepend=" AND " property="unpassQuantity">
unpass_quantity = #unpassQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
......@@ -419,8 +425,8 @@
work_by, <!-- 生产人 -->
work_name, <!-- 生产人名称 -->
quantity, <!-- 数量 -->
passQuantity, <!-- 合格数量 -->
unpassQuantity, <!-- 不合格数量 -->
pass_quantity, <!-- 合格数量 -->
unpass_quantity, <!-- 不合格数量 -->
single_weight, <!-- 单重 -->
total_weight, <!-- 总重 -->
check_by, <!-- 质检人 -->
......@@ -435,7 +441,10 @@
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #matId#, #workId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#, #checkCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #workBy#, #workName#, #quantity#, #passquantity#, #unpassquantity#, #singleWeight#, #totalWeight#, #checkBy#, #checkName#, #checkDate#, #checkStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #matId#, #workId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#, #checkCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #workBy#, #workName#, #quantity#, #passQuantity#, #unpassQuantity#, #singleWeight#, #totalWeight#, #checkBy#, #checkName#, #checkDate#, #checkStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC002
</selectKey>
</insert>
<delete id="delete">
......@@ -452,46 +461,46 @@
<update id="update">
UPDATE ${hggpSchema}.HGZL002
SET
mat_id = #matId#, <!-- 物料清单ID -->
work_id = #workId#, <!-- 报工单ID -->
tech_flow_id = #techFlowId#, <!-- 工艺流程ID -->
tech_flow_name = #techFlowName#, <!-- 工艺流程名称 -->
invent_process_id = #inventProcessId#, <!-- 存货工序ID,对应HGPZ005A.id -->
process_code = #processCode#, <!-- 工序编码 -->
process_name = #processName#, <!-- 工序名称 -->
process_order = #processOrder#, <!-- 加工顺序 -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编码 -->
dep_name = #depName#, <!-- 部门名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
work_code = #workCode#, <!-- 报工单编码 -->
check_code = #checkCode#, <!-- 质检单编码 -->
product_type = #productType#, <!-- 产品类型 -->
product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 -->
plan_start_date = #planStartDate#, <!-- 计划开始日期 -->
plan_end_date = #planEndDate#, <!-- 计划结束日期 -->
factory_code = #factoryCode#, <!-- 工厂编号 -->
factory_name = #factoryName#, <!-- 工厂名称 -->
group_code = #groupCode#, <!-- 工作组编号 -->
group_name = #groupName#, <!-- 工作组名称 -->
work_by = #workBy#, <!-- 生产人 -->
work_name = #workName#, <!-- 生产人名称 -->
quantity = #quantity#, <!-- 数量 -->
passQuantity = #passquantity#, <!-- 合格数量 -->
unpassQuantity = #unpassquantity#, <!-- 不合格数量 -->
single_weight = #singleWeight#, <!-- 单重 -->
total_weight = #totalWeight#, <!-- 总重 -->
<!--&#45;&#45; mat_id = #matId#, &lt;!&ndash; 物料清单ID &ndash;&gt;
&#45;&#45; work_id = #workId#, &lt;!&ndash; 报工单ID &ndash;&gt;
&#45;&#45; tech_flow_id = #techFlowId#, &lt;!&ndash; 工艺流程ID &ndash;&gt;
&#45;&#45; tech_flow_name = #techFlowName#, &lt;!&ndash; 工艺流程名称 &ndash;&gt;
&#45;&#45; invent_process_id = #inventProcessId#, &lt;!&ndash; 存货工序ID,对应HGPZ005A.id &ndash;&gt;
&#45;&#45; process_code = #processCode#, &lt;!&ndash; 工序编码 &ndash;&gt;
&#45;&#45; process_name = #processName#, &lt;!&ndash; 工序名称 &ndash;&gt;
&#45;&#45; process_order = #processOrder#, &lt;!&ndash; 加工顺序 &ndash;&gt;
&#45;&#45; company_code = #companyCode#, &lt;!&ndash; 公司编码 &ndash;&gt;
&#45;&#45; company_name = #companyName#, &lt;!&ndash; 公司名称 &ndash;&gt;
&#45;&#45; dep_code = #depCode#, &lt;!&ndash; 部门编码 &ndash;&gt;
&#45;&#45; dep_name = #depName#, &lt;!&ndash; 部门名称 &ndash;&gt;
&#45;&#45; proj_code = #projCode#, &lt;!&ndash; 项目编码 &ndash;&gt;
&#45;&#45; proj_name = #projName#, &lt;!&ndash; 项目名称 &ndash;&gt;
&#45;&#45; work_code = #workCode#, &lt;!&ndash; 报工单编码 &ndash;&gt;
&#45;&#45; check_code = #checkCode#, &lt;!&ndash; 质检单编码 &ndash;&gt;
&#45;&#45; product_type = #productType#, &lt;!&ndash; 产品类型 &ndash;&gt;
&#45;&#45; product_code = #productCode#, &lt;!&ndash; 产品编号 &ndash;&gt;
&#45;&#45; product_name = #productName#, &lt;!&ndash; 产品名称 &ndash;&gt;
&#45;&#45; plan_start_date = #planStartDate#, &lt;!&ndash; 计划开始日期 &ndash;&gt;
&#45;&#45; plan_end_date = #planEndDate#, &lt;!&ndash; 计划结束日期 &ndash;&gt;
&#45;&#45; factory_code = #factoryCode#, &lt;!&ndash; 工厂编号 &ndash;&gt;
&#45;&#45; factory_name = #factoryName#, &lt;!&ndash; 工厂名称 &ndash;&gt;
&#45;&#45; group_code = #groupCode#, &lt;!&ndash; 工作组编号 &ndash;&gt;
&#45;&#45; group_name = #groupName#, &lt;!&ndash; 工作组名称 &ndash;&gt;
&#45;&#45; work_by = #workBy#, &lt;!&ndash; 生产人 &ndash;&gt;
&#45;&#45; work_name = #workName#, &lt;!&ndash; 生产人名称 &ndash;&gt;
&#45;&#45; quantity = #quantity#, &lt;!&ndash; 数量 &ndash;&gt;-->
pass_quantity = #passQuantity#, <!-- 合格数量 -->
unpass_quantity = #unpassQuantity#, <!-- 不合格数量 -->
<!--&#45;&#45; single_weight = #singleWeight#, &lt;!&ndash; 单重 &ndash;&gt;
&#45;&#45; total_weight = #totalWeight#, &lt;!&ndash; 总重 &ndash;&gt;-->
check_by = #checkBy#, <!-- 质检人 -->
check_name = #checkName#, <!-- 质检人名称 -->
check_date = #checkDate#, <!-- 质检日期 -->
check_status = #checkStatus#, <!-- 提交状态 0:质检中;1:质检完成 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
<!--&#45;&#45; account_code = #accountCode#, &lt;!&ndash; 帐套 &ndash;&gt;
&#45;&#45; created_by = #createdBy#, &lt;!&ndash; 创建人 &ndash;&gt;
&#45;&#45; created_name = #createdName#, &lt;!&ndash; 创建人名称 &ndash;&gt;
&#45;&#45; created_time = #createdTime#, &lt;!&ndash; 创建时间 &ndash;&gt;-->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-31 14:53:27
Version : 1.0
schema : hggp
tableName : HGZL004
id BIGINT NOT NULL primarykey,
check_id BIGINT NOT NULL,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
dep_code VARCHAR,
dep_name VARCHAR,
proj_code VARCHAR,
proj_name VARCHAR,
handle_status TINYINT,
process_sugges VARCHAR,
rectificat_sugges VARCHAR,
check_type TINYINT,
check_code VARCHAR,
product_type TINYINT,
product_code VARCHAR,
product_name VARCHAR,
factory_code VARCHAR,
factory_name VARCHAR,
group_code VARCHAR,
group_name VARCHAR,
work_by VARCHAR,
work_name VARCHAR,
check_by VARCHAR,
check_name VARCHAR,
account_code VARCHAR NOT NULL,
created_by VARCHAR,
created_name VARCHAR,
created_time VARCHAR,
updated_by VARCHAR,
updated_name VARCHAR,
updated_time VARCHAR
-->
<sqlMap namespace="HGZL004">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkId">
check_id = #checkId#
</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="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="handleStatus">
handle_status = #handleStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processSugges">
process_sugges = #processSugges#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="rectificatSugges">
rectificat_sugges = #rectificatSugges#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkType">
check_type = #checkType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkCode">
check_code = #checkCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
group_name = #groupName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workBy">
work_by = #workBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workName">
work_name = #workName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkBy">
check_by = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
check_name = #checkName#
</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.zl.domain.HGZL004">
SELECT
id as "id",
check_id as "checkId", <!-- 质检单ID -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编码 -->
dep_name as "depName", <!-- 部门名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
handle_status as "handleStatus", <!-- 处理状态 0:待处理;1:处理中;2:已处理 -->
process_sugges as "processSugges", <!-- 处理意见 -->
rectificat_sugges as "rectificatSugges", <!-- 整改措施 -->
check_type as "checkType", <!-- 质检单类型 1:工序质检单;2:日常巡检单 -->
check_code as "checkCode", <!-- 质检单编码 -->
product_type as "productType", <!-- 产品类型 -->
product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 -->
factory_code as "factoryCode", <!-- 工厂编号 -->
factory_name as "factoryName", <!-- 工厂名称 -->
group_code as "groupCode", <!-- 工作组编号 -->
group_name as "groupName", <!-- 工作组名称 -->
work_by as "workBy", <!-- 生产人 -->
work_name as "workName", <!-- 生产人名称 -->
check_by as "checkBy", <!-- 质检人 -->
check_name as "checkName", <!-- 质检人名称 -->
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}.HGZL004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
id asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGZL004 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkId">
check_id = #checkId#
</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="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="handleStatus">
handle_status = #handleStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processSugges">
process_sugges = #processSugges#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="rectificatSugges">
rectificat_sugges = #rectificatSugges#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkType">
check_type = #checkType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkCode">
check_code = #checkCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
group_name = #groupName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workBy">
work_by = #workBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workName">
work_name = #workName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkBy">
check_by = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
check_name = #checkName#
</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}.HGZL004 (id,
check_id, <!-- 质检单ID -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
dep_code, <!-- 部门编码 -->
dep_name, <!-- 部门名称 -->
proj_code, <!-- 项目编码 -->
proj_name, <!-- 项目名称 -->
handle_status, <!-- 处理状态 0:待处理;1:处理中;2:已处理 -->
process_sugges, <!-- 处理意见 -->
rectificat_sugges, <!-- 整改措施 -->
check_type, <!-- 质检单类型 1:工序质检单;2:日常巡检单 -->
check_code, <!-- 质检单编码 -->
product_type, <!-- 产品类型 -->
product_code, <!-- 产品编号 -->
product_name, <!-- 产品名称 -->
factory_code, <!-- 工厂编号 -->
factory_name, <!-- 工厂名称 -->
group_code, <!-- 工作组编号 -->
group_name, <!-- 工作组名称 -->
work_by, <!-- 生产人 -->
work_name, <!-- 生产人名称 -->
check_by, <!-- 质检人 -->
check_name, <!-- 质检人名称 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #checkId#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #handleStatus#, #processSugges#, #rectificatSugges#, #checkType#, #checkCode#, #productType#, #productCode#, #productName#, #factoryCode#, #factoryName#, #groupCode#, #groupName#, #workBy#, #workName#, #checkBy#, #checkName#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGZL004 WHERE
id = #id#
</delete>
<delete id="deleteByIds">
DELETE FROM ${hggpSchema}.HGZL004 WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGZL004
SET
check_id = #checkId#, <!-- 质检单ID -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编码 -->
dep_name = #depName#, <!-- 部门名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
handle_status = #handleStatus#, <!-- 处理状态 0:待处理;1:处理中;2:已处理 -->
process_sugges = #processSugges#, <!-- 处理意见 -->
rectificat_sugges = #rectificatSugges#, <!-- 整改措施 -->
check_type = #checkType#, <!-- 质检单类型 1:工序质检单;2:日常巡检单 -->
check_code = #checkCode#, <!-- 质检单编码 -->
product_type = #productType#, <!-- 产品类型 -->
product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 -->
factory_code = #factoryCode#, <!-- 工厂编号 -->
factory_name = #factoryName#, <!-- 工厂名称 -->
group_code = #groupCode#, <!-- 工作组编号 -->
group_name = #groupName#, <!-- 工作组名称 -->
work_by = #workBy#, <!-- 生产人 -->
work_name = #workName#, <!-- 生产人名称 -->
check_by = #checkBy#, <!-- 质检人 -->
check_name = #checkName#, <!-- 质检人名称 -->
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>
package com.baosight.hggp.hg.zl.tools;
import com.baosight.hggp.common.CheckStatusEnum;
import com.baosight.hggp.common.CheckTypeEnum;
import com.baosight.hggp.common.HandleStatusEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.zl.domain.HGZL001;
import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
......@@ -84,9 +89,9 @@ public class HGZLTools {
public static class THGZL002 {
public static HGZL002 add(HGSC008 hgsc008){
public static HGZL002 add(HGSC008 hgsc008) {
HGZL002 hgzl002 = new HGZL002();
BeanUtils.copyProperties(hgsc008,hgzl002);
BeanUtils.copyProperties(hgsc008, hgzl002);
cleanBaseInfo(hgzl002);
hgzl002.setCheckStatus(CheckStatusEnum.CHECKING.getCode());
hgzl002.setWorkId(hgsc008.getId());
......@@ -94,11 +99,11 @@ public class HGZLTools {
hgzl002.setWorkBy(hgsc008.getCreatedBy());
hgzl002.setWorkName(hgsc008.getCreatedName());
hgzl002.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL002_CHECK_CODE));
DaoUtils.insert(HGZL002.INSERT,hgzl002);
DaoUtils.insert(HGZL002.INSERT, hgzl002);
return hgzl002;
}
private static void cleanBaseInfo(HGZL002 hgzl002){
private static void cleanBaseInfo(HGZL002 hgzl002) {
hgzl002.setCreatedBy(null);
hgzl002.setCreatedName(null);
hgzl002.setCreatedTime(null);
......@@ -109,6 +114,7 @@ public class HGZLTools {
hgzl002.setDepName(null);
hgzl002.setId(null);
}
public static List<HGZL002> list(List<Long> workIds) {
if (CollectionUtils.isEmpty(workIds)) {
return null;
......@@ -119,7 +125,55 @@ public class HGZLTools {
}
public static void deleteByWorkIds(List<Long> workIds) {
DaoUtils.update(HGZL002.DELETE_BY_WORKS, new HashMap<String,Object>(){{put("workIds",workIds);}});
DaoUtils.update(HGZL002.DELETE_BY_WORKS, new HashMap<String, Object>() {{
put("workIds", workIds);
}});
}
}
public static class THGZL004 {
public static void addByHGZL002(HGZL002 hgzl002) {
List<HGZL004> hgzl004DbList = listByCheckId(hgzl002.getId(),CheckTypeEnum.PROCESS_CHECK.getCode());
if(hgzl002.getUnpassQuantity()>0&&CollectionUtils.isEmpty(hgzl004DbList)) {
HGZL004 hgzl004 = new HGZL004();
BeanUtils.copyProperties(hgzl002, hgzl004);
cleanBaseInfo(hgzl004);
hgzl004.setCheckId(hgzl002.getId());
hgzl004.setCheckType(CheckTypeEnum.PROCESS_CHECK.getCode());
hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
hgzl004.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL002_CHECK_CODE));
DaoUtils.insert(HGZL004.INSERT, hgzl004);
}
//修改质检单问题数量为0的情况下,删除通知单,并删除相应附件照片
// if(hgzl002.getUnpassQuantity()==0&&CollectionUtils.isNotEmpty(hgzl004DbList)){
// List<Long> ids = hgzl004DbList.stream().map(HGZL004::getId).collect(Collectors.toList());
// DaoUtils.update(HGZL004.DELETE_BY_IDS,new HashMap<String,Object>(){{put("ids",ids);}});
// ids.forEach( id -> {
// HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_DEFECT);
// HGSCTools.THGSC099.deleteByMatId(id,HGConstant.FileBizType.CHECK_HANDLE);
// });
// }
}
private static void cleanBaseInfo(HGZL004 hgzl004) {
hgzl004.setCreatedBy(null);
hgzl004.setCreatedName(null);
hgzl004.setCreatedTime(null);
hgzl004.setUpdatedBy(null);
hgzl004.setUpdatedName(null);
hgzl004.setUpdatedTime(null);
hgzl004.setDepCode(null);
hgzl004.setDepName(null);
hgzl004.setId(null);
}
public static List<HGZL004> listByCheckId(Long checkId, Integer checkType) {
Map queryMap = new HashMap();
queryMap.put(HGZL004.FIELD_check_id, checkId);
queryMap.put(HGZL004.FIELD_check_type, checkType);
return DaoBase.getInstance().query(HGZL004.QUERY, queryMap);
}
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ $(function () {
+ 'onclick="showDetail(' + item.id + ', ' + item.status + ')" >销售出库单详情</a>';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >提交</a>';
'onclick="updateStatus(' + item.id + ',1)" >提交</a>';
} else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >未提交</a>';
......
......@@ -69,20 +69,6 @@ $(function() {
template: function (options) {
return options.thick == 0 ? "-" : options.thick;
}
}, {
field: "price",
template: function (options) {
options.amount = options.quantity*options.price;
return options.price
}
}, {
field: "amount",
template: function (options) {
if (options.quantity != 0){
options.price = options.amount/options.quantity;
}
return options.amount;
}
}],
loadComplete: function(grid) {
// 此 grid 对象
......@@ -90,7 +76,8 @@ $(function() {
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field == "price") {
loadChange(grid,e,"amount");
let amount = e.items[0].quantity*e.items[0].price;
resultGrid.setCellValue(e.items[0],"amount",amount);
}else if (e.field == "amount") {
if (e.items[0].price==0){
loadChange(grid,e,"price");
......
......@@ -49,7 +49,7 @@
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" enable="true" readonly="true" width="100" format="{0:N3}" editType="text"
<EF:EFColumn ename="quantity" cname="数量" enable="true" readonly="true" width="100" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
......@@ -65,7 +65,7 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="amount" cname="金额" width="100" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="amount" cname="金额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
......
$(function () {
var loginUser = __eiInfo.getBlock("userBlockId").getMappedRows();
IPLATUI.EFGrid = {
"result": {
pageable: {
input: true,
numeric: false,
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "unpassQuantity",
template: function (item) {
let template = "";
if (item.unpassQuantity&&isNumber(item.unpassQuantity)) {
item['passQuantity'] = item['quantity'] - item.unpassQuantity;
}
return item.unpassQuantity;
}
},{
field: "passQuantity",
template: function (item) {
let template = "";
if (item.passQuantity&&isNumber(item.passQuantity)) {
item['unpassQuantity'] = item['quantity'] - item.passQuantity;
}
return item.passQuantity;
}
}],
onSuccess: function (e) {
},
loadComplete: function(grid) {
// 此 grid 对象
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field == "unpassQuantity") {
loadChange(grid,e,"passQuantity");
}
// 判断父级节点是否发生变化
if (e.field == "passQuantity") {
loadChange(grid,e,"unpassQuantity");
}
});
},
onCheckRow: function (e){
if(e.checked){
if(e.model.checkStatus === '0') {
var now = new Date()
resultGrid.setCellValue(e.row, "checkDate", now.getFullYear() + "-" + now.getMonth() + "-" + now.getDay());
}
resultGrid.setCellValue(e.row, "checkBy", loginUser[0].userId);
resultGrid.setCellValue(e.row, "checkName", loginUser[0].userName);
}
// else{
// if(e.model.checkStatus === '0'){
// resultGrid.setCellValue(e.row,"checkDate","");
// }
//
// }
},
onSave: function(e){
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
}
}
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 提交操作
*
* @param id
* @param checkNo
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let passQuantity = rows[i]['passQuantity'];
let unpassQuantity = rows[i]['unpassQuantity'];
let quantity = rows[i]['quantity'];
if (!isNumber(passQuantity)||!isNumber(unpassQuantity)) {
message("第" + (i + 1) + "行合格数量与不合格数量必须是大于等于0的数字!");
return;
}
if (passQuantity > quantity) {
message("第" + (i + 1) + "行合格数量不能大于报工数量!");
return;
}
if (unpassQuantity > quantity) {
message("第" + (i + 1) + "行不合格数量不能大于报工数量!");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做质检完成操作吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGZL002", "save", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="工序质检单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="质检日期" endCname="到" blockId="inqu_status"
startName="checkDateFrom" endName="checkDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput blockId="inqu_status" row="0" ename="checkCode" cname="质检单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="checkName" cname="质检员" placeholder="模糊查询" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect cname="质检状态" ename="checkStatus" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.checkStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="workCode" cname="生产报工单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkCode" cname="质检单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="workName" cname="生产人员" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productCode" cname="存货编码" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="存货名称" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="报工数量" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="passQuantity" cname="合格数量" width="90" align="center" required="true"/>
<EF:EFColumn ename="unpassQuantity" cname="不合格数量" width="100" align="center" required="true"/>
<EF:EFColumn ename="checkDate" cname="质检日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="checkName" cname="质检员" width="100" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="checkStatus" cname="质检状态" width="80" align="center" enable="false"
readonly="true">
<EF:EFCodeOption codeName="hggp.checkStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment