Commit 18b3df0f by wuwenlong

整改通知单dev

parent dbcb909a
......@@ -6,8 +6,8 @@ package com.baosight.hggp.common;
*/
public enum HandleStatusEnum {
UNPROCESS(0,"待处理"),
processing(1,"处理中"),
processed(2,"已处理");
PROCESSING(1,"处理中"),
PROCESSED(2,"已处理");
private Integer code;
private String value;
......
......@@ -5,8 +5,9 @@ package com.baosight.hggp.hg.constant;
* @date:2024/1/18,17:16
*/
public class HGSqlConstant {
/**
/**
* HGCG001 SQL 定义
*
* @author:songx
......@@ -534,7 +535,11 @@ public class HGSqlConstant {
// 更新完成数量
public static final String UPDATE_COMPLETE_NUM = "HPSC006.updateCompleteNum";
}
public class HGZL004 {
public static final String LOCK = "HGZL004.lock";
}
/**
* 用户
*
......
......@@ -92,6 +92,7 @@ public class HGZL004 extends DaoEPBase {
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 BATCH_COMPLETE= "HGZL004.batch_complete";
private Long id = new Long(0);
private Long checkId = new Long(0); /* 质检单ID*/
......
package com.baosight.hggp.hg.zl.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HGZL004A.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-03 13:23:04 create
*/
public class HGZL004A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id";
public static final String FIELD_inform_id = "informId"; /* 整改通知单ID*/
public static final String FIELD_content = "content"; /* 沟通内容*/
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_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_inform_id = "inform_id"; /* 整改通知单ID*/
public static final String COL_content = "content"; /* 沟通内容*/
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_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 = "HGZL004A.query";
public static final String COUNT = "HGZL004A.count";
public static final String INSERT = "HGZL004A.insert";
public static final String UPDATE = "HGZL004A.update";
public static final String DELETE = "HGZL004A.delete";
private Long id = new Long(0);
private Long informId = new Long(0); /* 整改通知单ID*/
private String content = " "; /* 沟通内容*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编码*/
private String depName = " "; /* 部门名称*/
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_inform_id);
eiColumn.setDescName("整改通知单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_content);
eiColumn.setDescName("沟通内容");
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_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 HGZL004A() {
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 informId - 整改通知单ID.
* @return the informId
*/
public Long getInformId() {
return this.informId;
}
/**
* set the informId - 整改通知单ID.
*
* @param informId - 整改通知单ID
*/
public void setInformId(Long informId) {
this.informId = informId;
}
/**
* get the content - 沟通内容.
* @return the content
*/
public String getContent() {
return this.content;
}
/**
* set the content - 沟通内容.
*
* @param content - 沟通内容
*/
public void setContent(String content) {
this.content = content;
}
/**
* 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 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));
setInformId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_inform_id)), informId));
setContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_content)), content));
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));
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_inform_id, StringUtils.toString(informId, eiMetadata.getMeta(FIELD_inform_id)));
map.put(FIELD_content, StringUtils.toString(content, eiMetadata.getMeta(FIELD_content)));
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_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.HandleStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
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 org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -52,6 +60,53 @@ public class ServiceHGZL004 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "整改通知单", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<HGZL004> hgzl004List = MapUtils.toDaoEPBase(inInfo,HGZL004.class);
hgzl004List.forEach( o -> {
HGZL004 db004 = HGZLTools.THGZL004.get(o.getId());
HGZLTools.THGZL004.lock(o.getId());
HandleStatusEnum stat = HandleStatusEnum.getEnumByCode(db004.getHandleStatus());
switch (stat){
case UNPROCESS:
if(StringUtils.isNotBlank(o.getProcessSugges())||StringUtils.isNotBlank(o.getRectificatSugges())){
o.setHandleStatus(HandleStatusEnum.PROCESSING.getCode());
}
DaoUtils.update(HGZL004.UPDATE,o);
break;
case PROCESSING:
break;
case PROCESSED:
AssertUtils.isTrue(true,String.format("检查单号[%s]已处理完成,不能修改!"));
break;
default:
break;
}
});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl004List.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "整改通知单", operType = "处理完成", operDesc = "处理完成")
public EiInfo complete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
DaoUtils.update(HGZL004.BATCH_COMPLETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL004A;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
* @author wwl
* @date 2025年05月29日 17:18
*/
public class ServiceHGZL004A extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "整改通知单-沟通记录", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL004A.QUERY, new HGZL004A());
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, HGZL004A.QUERY, new HGZL004A());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -369,5 +369,28 @@
WHERE
id = #id#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGZL004
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</update>
<update id="batch_complete">
UPDATE ${hggpSchema}.HGZL004
SET
handle_status = 2, <!-- 处理状态 0:待处理;1:处理中;2:已处理 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-03 13:23:04
Version : 1.0
schema : hggp
tableName : HGZL004A
id BIGINT NOT NULL primarykey,
inform_id BIGINT NOT NULL,
content VARCHAR,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
dep_code VARCHAR,
dep_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="HGZL004A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="informId">
inform_id = #informId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
content = #content#
</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="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.HGZL004A">
SELECT
id as "id",
inform_id as "informId", <!-- 整改通知单ID -->
content as "content", <!-- 沟通内容 -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编码 -->
dep_name as "depName", <!-- 部门名称 -->
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}.HGZL004A 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}.HGZL004A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="informId">
inform_id = #informId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
content = #content#
</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="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}.HGZL004A (id,
inform_id, <!-- 整改通知单ID -->
content, <!-- 沟通内容 -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
dep_code, <!-- 部门编码 -->
dep_name, <!-- 部门名称 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #informId#, #content#, #companyCode#, #companyName#, #depCode#, #depName#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGZL004A WHERE
id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGZL004A
SET
inform_id = #informId#, <!-- 整改通知单ID -->
content = #content#, <!-- 沟通内容 -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编码 -->
dep_name = #depName#, <!-- 部门名称 -->
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>
......@@ -7,6 +7,7 @@ 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.HGSC006A;
import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.zl.domain.HGZL001;
......@@ -22,6 +23,7 @@ import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
......@@ -133,6 +135,21 @@ public class HGZLTools {
public static class THGZL004 {
/**
* 锁
*
* @param id
* @return
*/
public static void lock(Long id) {
if (Objects.isNull(id)||id<=0) {
return;
}
Map queryMap = new HashMap();
queryMap.put(HGZL004.FIELD_id, id);
DaoBase.getInstance().update(HGSqlConstant.HGZL004.LOCK, queryMap);
}
public static void addByHGZL002(HGZL002 hgzl002) {
List<HGZL004> hgzl004DbList = listByCheckId(hgzl002.getId(),CheckTypeEnum.PROCESS_CHECK.getCode());
if(hgzl002.getUnpassQuantity()>0&&CollectionUtils.isEmpty(hgzl004DbList)) {
......@@ -174,6 +191,18 @@ public class HGZLTools {
queryMap.put(HGZL004.FIELD_check_type, checkType);
return DaoBase.getInstance().query(HGZL004.QUERY, queryMap);
}
/**
* @param id
*/
public static HGZL004 get(Long id) {
AssertUtils.isNull(id, "ID不能为空");
Map paramMap = new HashMap();
paramMap.put(HGZL004.FIELD_id, id);
List<HGZL004> results = DaoBase.getInstance().query(HGZL004.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
}
\ No newline at end of file
......@@ -69,27 +69,9 @@ let save = function () {
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 + "]条数据做质检完成操作吗? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做保存操作吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGZL002", "save", true);
JSUtils.submitGridsData("result", "HGZL004", "save", true);
}
});
}
......@@ -108,3 +90,12 @@ function showUploadFile(id,bizType,title) {
height: "80%",
});
}
function communication(id) {
JSColorbox.open({
href: "HGZL004A?methodName=initLoad&inqu_status-0-informId=" + id,
title: "<div style='text-align: center;'>沟通记录</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
input: true,
numeric: false,
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [],
onSuccess: function (e) {
},
loadComplete: function(grid) {
}
}
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
<!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:EFInput cname="通知单ID" ename="informId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="content" cname="内容" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="chreatedName" cname="创建人" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker cname="沟通日期" ename="inqu_status-0-createdTime" colWidth="3"
format="yyyy-MM-dd" readonly="false"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="content" cname="内容" width="150" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="chreatedName" cname="创建人" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" editType="date"
dateFormat="yyyy-MM-dd HH:mm:ss" parseFormats="['yyyyMMddHHmmss']" enable="true" width="130" align="center" readOnly="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment