Commit fa7f83d3 by 宋祥

1.质量巡检单

parent 01b933a4
......@@ -113,7 +113,7 @@ public enum DdynamicEnum {
* 用途:厂区管理下拉框
* 编写:songx
*/
FACTORY_RECORD_BLOCK_ID("factory_record_block_id", "orgId", "orgCname", "HPXSOrg.queryFactoryComboBox"),
FACTORY_RECORD_BLOCK_ID("factory_record_block_id", "orgId", "orgCname", "HGXSOrg.queryFactoryComboBox"),
/**
......@@ -121,7 +121,7 @@ public enum DdynamicEnum {
* 用途:组管理下拉框
* 编写:songx
*/
GROUP_RECORD_BLOCK_ID("group_record_block_id","orgId","orgCname","HPXSOrg.queryGroupComboBox"),
GROUP_RECORD_BLOCK_ID("group_record_block_id","orgId","orgCname","HGXSOrg.queryGroupComboBox"),
/**
* 模块:组管理
......
......@@ -5,6 +5,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
......@@ -20,23 +21,6 @@ import java.util.Map;
public class HGCGUtils {
/**
* 设置查询条件
*
* @param queryRow
*/
public static void setCondition(Map queryRow) {
// 创建时间
String createdTimeFrom = MapUtils.getString(queryRow, "createdTimeFrom");
if (StringUtils.isNotBlank(createdTimeFrom)) {
queryRow.put("createdTimeFrom", DateUtils.formatShort(createdTimeFrom));
}
String createdTimeTo = MapUtils.getString(queryRow, "createdTimeTo");
if (StringUtils.isNotBlank(createdTimeTo)) {
queryRow.put("createdTimeTo", DateUtils.formatShort(createdTimeTo));
}
}
/**
* HGCG001 工具类
*
* @author:songx
......@@ -51,7 +35,7 @@ public class HGCGUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HGCGUtils.setCondition(queryRow);
HGUtils.setCondition(queryRow);
// 计划日期
String planDate = MapUtils.getString(queryRow, HGCG001.FIELD_PLAN_DATE);
if (StringUtils.isNotBlank(planDate)) {
......@@ -76,7 +60,7 @@ public class HGCGUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HGCGUtils.setCondition(queryRow);
HGUtils.setCondition(queryRow);
// 合同日期
String contractDate = MapUtils.getString(queryRow, HGCG002.FIELD_CONTRACT_DATE);
if (StringUtils.isNotBlank(contractDate)) {
......@@ -124,7 +108,7 @@ public class HGCGUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HGCGUtils.setCondition(queryRow);
HGUtils.setCondition(queryRow);
// 收货日期
String receiveDate = MapUtils.getString(queryRow, HGCG003.FIELD_RECEIVE_DATE);
if (StringUtils.isNotBlank(receiveDate)) {
......
......@@ -51,10 +51,10 @@ public class HGConstant {
public static final String HPZL001_NUMBER = "HPZL001_NUMBER";
//采购入库单号
public static final String HPKC001_NUMBER = "HPKC001_NUMBER";
//生产领料单号
public static final String HPKC002_NUMBER = "HPKC002_NUMBER";
// 生产领料单号
public static final String PROD_REQ_NO = "PROD_REQ_NO";
// 生产入库单号
public static final String HPKC003_PROD_NO = "HPKC003_PROD_NO";
public static final String PROD_DEPOSIT_NO = "PROD_DEPOSIT_NO";
// 生产销售单号
public static final String HPKC004_SALE_NO = "HPKC004_SALE_NO";
// 供应商编码
......
......@@ -97,7 +97,21 @@ public class HGSqlConstant {
}
/**
* HGKC001 SQL 定义
* HGKC003 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HgKc003 {
// 模块名称
private static final String MODULE_NAME = "HGKC003.";
// 锁
public static final String LOCK = MODULE_NAME + "lock";
}
/**
* HGKC010 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
......@@ -115,6 +129,24 @@ public class HGSqlConstant {
}
/**
* HGKC011 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HgKc011 {
// 模块名称
private static final String MODULE_NAME = "HGKC011.";
// 锁
public static final String LOCK = MODULE_NAME + "lock";
// 锁
public static final String LOCKS = MODULE_NAME + "locks";
// 修改库存
public static final String UPDATE_INV = MODULE_NAME + "updateInv";
}
/**
* HPKC001 SQL 定义
*
* @author:songx
......
......@@ -125,7 +125,7 @@ public class ServiceHGKC002 extends ServiceBase {
// 生成红冲记录
HGKC002 dbKc002 = dbKc002Map.get(fKc002.getReqNo());
HGKC002 newKc002 = BeanUtils.copy(dbKc002, HGKC002.class);
newKc002.setReqNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HPKC002_NUMBER));
newKc002.setReqNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_REQ_NO));
newKc002.setApplyQty(dbKc002.getApplyQty().negate());
newKc002.setApplyWeight(dbKc002.getApplyWeight().negate());
newKc002.setOldReqNo(dbKc002.getReqNo());
......
......@@ -127,7 +127,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
Long invId = fKc010a.getId();
HGKC010 dbKc010 = dbKc010Map.get(invId);
HGKC002 newKc002 = BeanUtils.copy(dbKc010, HGKC002.class);
newKc002.setReqNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HPKC002_NUMBER));
newKc002.setReqNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_REQ_NO));
newKc002.setReceiptDate(DateUtils.shortDate());
newKc002.setApplyQty(applyQty);
newKc002.setUnitWeight(dbKc010.getInvUnitWeight());
......
package com.baosight.hggp.hg.kc.service;
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.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/22,10:48
*/
public class ServiceHGKC003 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC003().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HGKCUtils.HgKc003.setCondition(queryRow);
inInfo = super.query(inInfo, HGKC003.QUERY, new HGKC003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产入库单", operType = "删除", operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<HGKC003> fKc003s = MapUtils.toDaoEPBase(inInfo, HGKC003.class);
// 锁库存
Map<String, HGKC003> dbKc003Map = HGKCUtils.HgKc003.lockGetDataEp(fKc003s);
// 锁生产计划明细
// HPSCTools.HpSc004.lock(prodOrderNos);
// 校验数据
this.checkDeleteData(fKc003s, dbKc003Map);
// 查询数据
this.deleteData(fKc003s, dbKc003Map);
inInfo.setMsg("删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* @param fKc003s
* @param dbKc003Map
*/
private void checkDeleteData(List<HGKC003> fKc003s, Map<String, HGKC003> dbKc003Map) {
for (HGKC003 fKc003 : fKc003s) {
String depositNo = fKc003.getDepositNo();
HGKC003 dbKc003 = dbKc003Map.get(depositNo);
AssertUtils.isEquals(DeleteFlagEnum.REMOVE.getCode(), dbKc003.getDeleteFlag(),
String.format("入库单【%s】已删除,请勿重复操作", depositNo));
}
}
/**
* 删除数据
*
* @param fKc003s
* @param dbKc003Map
*/
private void deleteData(List<HGKC003> fKc003s, Map<String, HGKC003> dbKc003Map) {
for (HGKC003 fKc003 : fKc003s) {
fKc003.setDeleteFlag(DeleteFlagEnum.REMOVE.getCode());
DaoUtils.update(HGKC003.DELETE, fKc003);
// 生产一条负数量和产量的红冲记录
HGKC003 dbKc003 = dbKc003Map.get(fKc003.getDepositNo());
HGKC003 newKc003 = BeanUtils.copy(dbKc003, HGKC003.class);
newKc003.setInvQty(dbKc003.getInvQty().negate());
newKc003.setInvWeight(dbKc003.getInvWeight().negate());
newKc003.setDeleteFlag(DeleteFlagEnum.REMOVE.getCode());
newKc003.setDepositNoOld(fKc003.getDepositNo());
newKc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
DaoUtils.insert(HGKC003.INSERT, newKc003);
// 同步生产计划
// HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount());
// 更新生产任务已完成数量
// HPSCTools.HpSc005a.updateCompleteNum(newKc003.getProdTaskNo(), newKc003.getAmount());
// 修改库存
HGKCUtils.HgKc011.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getProdOrderNo(),
newKc003.getInvQty(), newKc003.getInvWeight());
}
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 选择生产任务
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHGKC003A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "生产任务查询", operType = "查询", operDesc = "生产入库单-生产任务查询-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
// inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "生产任务查询", operType = "查询", operDesc = "生产入库单-生产任务查询-查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("isComplete", CommonConstant.YesNo.NO_0);
// inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 生成入库单
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务查询", operType = "插入", operDesc = "生产入库单-生产任务查询-生成入库单")
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 订单号
List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo");
// 任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
// 锁生产计划
// HPSCTools.HpSc004.lock(prodOrderNos);
// 锁生产订单
// HPSCTools.HpSc005.lock(prodOrderNos);
// 锁生产任务
// HPSCTools.HpSc005a.lock(prodTaskNos);
// 查询生产任务信息
// Map<String, HPSC005B> dbSc005bMap = HPSCTools.HpSc005b.map(prodTaskNos);
// 数据校验
this.checkSelectData();
// 生成入库单
this.saveSelectData();
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "生成入库单失败");
inInfo.setStatus(500);
}
return inInfo;
}
/**
* 数据检查
*/
private void checkSelectData() {
// for (Map row : resultRows) {
// String whCode = MapUtils.getString(row, "whCode");
// BigDecimal applyNum = MapUtils.getBigDecimal(row, "applyNum");
// HPSC005B fSc005b = new HPSC005B();
// fSc005b.fromMap(row);
// AssertUtils.isEmpty(whCode, String.format("任务号[%s]的仓库不存在为空", fSc005b.getProdTaskNo()));
// HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
// AssertUtils.isTrue(ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005b.getStatus()),
// String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId()));
// BigDecimal subNum = dbSc005b.getNum().subtract(dbSc005b.getCompleteNum());
// AssertUtils.isGt(applyNum, subNum, String.format("任务号[%s]申请数量[%s]不能大于未入库的数量[%s]",
// fSc005b.getProdTaskNo(), applyNum, subNum));
// 校验是否存在巡检单
/* Map queryMap = new HashMap();
queryMap.put("prodTaskNo", fSc005b.getProdTaskNo());
queryMap.put("status", CommonConstant.YesNo.NO_0);
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
AssertUtils.isNotEmpty(dbZl001s, String.format("任务号[%s]存在未处理的质量巡检单,请先处理质量巡检单",
fSc005b.getProdTaskNo()));*/
// }
}
/**
* 数据写入
*/
private void saveSelectData() {
// for (Map row : resultRows) {
// String whCode = MapUtils.getString(row, "whCode");
// BigDecimal applyNum = MapUtils.getBigDecimal(row, "applyNum");
// HPSC005B fSc005b = new HPSC005B();
// fSc005b.fromMap(row);
// HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
// HPKC003 newKc003 = BeanUtils.copy(dbSc005b, HPKC003.class);
// newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
// newKc003.setDocumentDate(DateUtils.shortDate());
// newKc003.setWhCode(whCode);
// newKc003.setRemark(MapUtils.getString(row, "remark1"));
// newKc003.setWhName(HPPZTools.HpPz007.getByCode(whCode).getWhName());
// newKc003.setAmount(applyNum);
// newKc003.setWeight(applyNum.multiply(dbSc005b.getUnitWt()).divide(new BigDecimal("1000")));
// newKc003.setDeleteFlag(CommonConstant.YesNo.NO_0);
// DaoUtils.insert(HPKC003.INSERT, newKc003);
// // 同步生产计划
// HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount());
// // 更新生产任务已完成数量
// HPSCTools.HpSc005a.updateCompleteNum(fSc005b.getProdTaskNo(), applyNum);
// // 修改库存
// HPKCTools.updateProdStock(newKc003.getWhCode(), newKc003.getProdOrderNo(),
// newKc003.getAmount(), newKc003.getWeight(), fSc005b.getFactoryCode());
// }
}
}
......@@ -2,7 +2,6 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
......
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.kc.domain.HGKC011;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/9,11:04
*/
public class ServiceHGKC011 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "综合库存", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC011().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "综合库存", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HGKC011.QUERY, new HGKC011());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -35,33 +35,15 @@
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<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="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
......@@ -98,24 +80,6 @@
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invUnitWeight">
INV_UNIT_WEIGHT = #invUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invWeight">
INV_WEIGHT = #invWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
......@@ -133,6 +97,11 @@
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC011">
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零部件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零部件名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
INV_QTY as "invQty", <!-- 数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
INV_WEIGHT as "invWeight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 厂区名称 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventCode">
SUB_INVENT_CODE = #subInventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventName">
SUB_INVENT_NAME = #subInventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.kc.domain.HGKC011">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC011 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC011 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC011 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零部件编码 -->
SUB_INVENT_NAME, <!-- 零部件名称 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
INV_QTY, <!-- 数量 -->
INV_UNIT_WEIGHT, <!-- 单重 -->
INV_WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME <!-- 厂区名称 -->
) VALUES (
#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #whCode#, #whName#, #prodOrderNo#, #projCode#,
#projName#, #inventCode#, #inventName#, #subInventCode#, #subInventName#,
#spec#, #length#, #width#, #thick#, #invQty#, #invUnitWeight#, #invWeight#,
#remark#, #factoryCode#, #factoryName#
)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGKC011 WHERE ID = #id#
</delete>
<!-- 锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGKC011
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND WH_CODE = #whCode#
AND PROD_ORDER_NO = #prodOrderNo#
</update>
<!-- 锁 -->
<update id="locks">
UPDATE ${hggpSchema}.HGKC011
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 更新库存 -->
<update id="updateInv">
UPDATE ${hggpSchema}.HGKC011
SET
INV_QTY = #invQty#, <!-- 库存数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 库存单重 -->
INV_WEIGHT = #invWeight# <!-- 库存重量 -->
WHERE ID = #id#
</update>
</sqlMap>
......@@ -4,7 +4,9 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC002;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC011;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.StringUtils;
import org.apache.commons.collections.CollectionUtils;
......@@ -118,6 +120,55 @@ public class HGKCTools {
}
/**
* HGKC003 工具类
*
* @author:songx
* @date:2024/5/15,9:49
*/
public static class HgKc003 {
/**
* 锁
*
* @param depositNos
* @return
*/
public static void lock(List<String> depositNos) {
if (CollectionUtils.isEmpty(depositNos)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("depositNos", depositNos);
DaoBase.getInstance().update(HGSqlConstant.HgKc003.LOCK, paramMap);
}
/**
* 查询
*
* @param depositNos
* @return
*/
public static List<HGKC003> list(List<String> depositNos) {
AssertUtils.isEmpty(depositNos, "领用单号不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("depositNos", depositNos);
return DaoBase.getInstance().query(HGKC003.QUERY, paramMap);
}
/**
* 查询
*
* @param depositNos
* @return
*/
public static Map<String, HGKC003> map(List<String> depositNos) {
List<HGKC003> results = list(depositNos);
return results.stream().collect(Collectors.toMap(HGKC003::getDepositNo, item -> item));
}
}
/**
* HGKC010 工具类
*
......@@ -204,4 +255,89 @@ public class HGKCTools {
}
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,14:33
*/
public static class HgKc011 {
/**
* 锁
*
* @param ids
* @return
*/
public static void lock(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("ids", ids);
DaoBase.getInstance().update(HGSqlConstant.HgKc011.LOCKS, paramMap);
}
/**
* 锁
*
* @param companyCode
* @param whCode
* @param prodOrderNo
* @return
*/
public static void lock(String companyCode, String whCode, String prodOrderNo) {
if (StringUtils.isBlank(companyCode) || StringUtils.isBlank(whCode) || StringUtils.isBlank(prodOrderNo)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("companyCode", companyCode);
paramMap.put("whCode", whCode);
paramMap.put("prodOrderNo", prodOrderNo);
DaoBase.getInstance().update(HGSqlConstant.HgKc011.LOCK, paramMap);
}
/**
* @param companyCode
* @param whCode
* @param prodOrderNo
*/
public static HGKC011 get(String companyCode, String whCode, String prodOrderNo) {
AssertUtils.isEmpty(companyCode, "公司编码不能为空");
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map paramMap = new HashMap();
paramMap.put("companyCode", companyCode);
paramMap.put("whCode", whCode);
paramMap.put("prodOrderNo", prodOrderNo);
List<HGKC011> results = DaoBase.getInstance().query(HGKC011.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param ids
* @return
*/
public static List<HGKC011> list(List<Long> ids) {
AssertUtils.isEmpty(ids, "库存ID不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
return DaoBase.getInstance().query(HGKC011.QUERY, paramMap);
}
/**
* 查询
*
* @param ids
* @return
*/
public static Map<Long, HGKC011> map(List<Long> ids) {
List<HGKC011> results = list(ids);
return results.stream().collect(Collectors.toMap(HGKC011::getId, item -> item));
}
}
}
......@@ -2,14 +2,16 @@ package com.baosight.hggp.hg.kc.utils;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC002;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC011;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.DateUtils;
......@@ -43,7 +45,7 @@ public class HGKCUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HGCGUtils.setCondition(queryRow);
HGUtils.setCondition(queryRow);
// 入库日期
String depositDate = MapUtils.getString(queryRow, HGKC001.FIELD_DEPOSIT_DATE);
if (StringUtils.isNotBlank(depositDate)) {
......@@ -90,7 +92,7 @@ public class HGKCUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HGCGUtils.setCondition(queryRow);
HGUtils.setCondition(queryRow);
// 单据日期
String receiptDate = MapUtils.getString(queryRow, HGKC002.FIELD_RECEIPT_DATE);
if (StringUtils.isNotBlank(receiptDate)) {
......@@ -123,6 +125,53 @@ public class HGKCUtils {
}
/**
* HGKC003 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public static class HgKc003 {
/**
* 设置查询条件
*
* @param queryRow 集合
* @return
*/
public static void setCondition(Map queryRow) {
HGUtils.setCondition(queryRow);
// 收货日期
String depositDate = MapUtils.getString(queryRow, HGKC003.FIELD_DEPOSIT_DATE);
if (StringUtils.isNotBlank(depositDate)) {
queryRow.put(HGKC003.FIELD_DEPOSIT_DATE, DateUtils.formatShort(depositDate));
}
}
/**
* 锁并且获取数据
*
* @param kc003s
* @return
*/
public static Map<String, HGKC003> lockGetDataEp(List<? extends HGKC003> kc003s) {
return lockGetData(ObjectUtils.listEpKey(kc003s, HGKC003.FIELD_DEPOSIT_NO));
}
/**
* 锁并且获取数据
*
* @param depositNos
* @return
*/
public static Map<String, HGKC003> lockGetData(List<String> depositNos) {
// 锁
HGKCTools.HgKc003.lock(depositNos);
// db数据
return HGKCTools.HgKc003.map(depositNos);
}
}
/**
* HGKC010 工具类
*
* @author:songx
......@@ -280,4 +329,162 @@ public class HGKCUtils {
}
}
/**
* HGKC011 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public static class HgKc011 {
/**
* 更新库存
*
* @param companyCode
* @param whCode
* @param prodOrderNo
* @param qty
* @param weight
*/
public static void updateInv(String companyCode, String whCode, String prodOrderNo, BigDecimal qty,
BigDecimal weight) {
updateInv(companyCode, whCode, prodOrderNo, qty, null, weight);
}
/**
* 更新库存
*
* @param companyCode
* @param whCode
* @param prodOrderNo
* @param qty
* @param unitWeight
* @param weight
*/
public static void updateInv(String companyCode, String whCode, String prodOrderNo, BigDecimal qty,
BigDecimal unitWeight, BigDecimal weight) {
HGKC011 newKc011 = buildBean(companyCode, whCode, prodOrderNo, qty, unitWeight, weight);
// 参数校验
checkUpdateInv(companyCode, whCode, prodOrderNo, qty, weight);
// 锁库存
HGKCTools.HgKc011.lock(companyCode, whCode, prodOrderNo);
// 获取DB数据
HGKC011 dbKc011 = HGKCTools.HgKc011.get(companyCode, whCode, prodOrderNo);
if (dbKc011 == null) {
addInvData(newKc011);
} else {
updateInvData(newKc011, dbKc011);
}
}
/**
* 构建对象
*
* @param companyCode
* @param whCode
* @param prodOrderNo
* @param qty
* @param unitWeight
* @param weight
* @return
*/
private static HGKC011 buildBean(String companyCode, String whCode, String prodOrderNo, BigDecimal qty,
BigDecimal unitWeight, BigDecimal weight) {
HGKC011 newKc011 = new HGKC011();
newKc011.setCompanyCode(companyCode);
newKc011.setWhCode(whCode);
newKc011.setProdOrderNo(prodOrderNo);
newKc011.setInvQty(qty);
newKc011.setInvUnitWeight(unitWeight);
newKc011.setInvWeight(weight);
return newKc011;
}
/**
* 参数校验
*
* @param companyCode
* @param whCode
* @param prodOrderNo
* @param qty
* @param weight
*/
private static void checkUpdateInv(String companyCode, String whCode, String prodOrderNo, BigDecimal qty,
BigDecimal weight) {
AssertUtils.isEmpty(companyCode, "公司编码不能为空");
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
AssertUtils.isNull(qty, "库存变更数量不能为空");
AssertUtils.isNull(weight, "库存变更重量不能为空");
AssertUtils.isTrue(qty.compareTo(BigDecimal.ZERO) == 0
&& weight.compareTo(BigDecimal.ZERO) == 0, "库存变更数量和重量不能为0");
}
/**
* 新增库存
*
* @param newKc011
*/
private static void addInvData(HGKC011 newKc011) {
// 公司
newKc011.setCompanyName(HGXSTools.XsOrg.get(newKc011.getCompanyCode()).getOrgCname());
// 仓库
newKc011.setWhName(HGPZTools.HgPz007.get(newKc011.getWhCode()).getWhName());
// 生产订单信息
// HGPZ005 dbPz005 = HGPZTools.HgPz005.get(newKc011.getProdOrderNo());
// newKc011.setInventType(dbPz005.getInventType());
// newKc011.setInventCode(dbPz005.getInventCode());
// newKc011.setInventName(dbPz005.getInventName());
// newKc011.setSpec(dbPz005.getSpec());
// newKc011.setLength(dbPz005.getLength());
// newKc011.setWidth(dbPz005.getWidth());
// newKc011.setThick(dbPz005.getThick());
newKc011.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGKC011.INSERT, newKc011);
}
/**
* 修改库存
*
* @param newKc011
* @param dbKc011
*/
private static void updateInvData(HGKC011 newKc011, HGKC011 dbKc011) {
BigDecimal newQty = newKc011.getInvQty().add(dbKc011.getInvQty());
AssertUtils.isGt(BigDecimal.ZERO, newQty, String.format("更新后的库存数量小于0(%s),请检查", newQty));
BigDecimal newWeight = newKc011.getInvWeight().add(dbKc011.getInvWeight());
AssertUtils.isGt(BigDecimal.ZERO, newWeight, String.format("更新后的库存重量小于0(%s),请检查", newWeight));
BigDecimal newUnitWeight = newQty.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO
: newWeight.divide(newQty, 3, RoundingMode.HALF_UP);
dbKc011.setInvQty(newQty);
dbKc011.setInvWeight(newWeight);
dbKc011.setInvUnitWeight(newUnitWeight);
DaoUtils.update(HGSqlConstant.HgKc011.UPDATE_INV, dbKc011);
}
/**
* 锁并且获取数据
*
* @param kc010s
* @return
*/
public static Map<Long, HGKC010> lockGetDataEp(List<? extends HGKC010> kc010s) {
return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010.FIELD_ID));
}
/**
* 锁并且获取数据
*
* @param ids
* @return
*/
public static Map<Long, HGKC010> lockGetData(List<Long> ids) {
// 锁
HGKCTools.HgKc010.lock(ids);
// db数据
return HGKCTools.HgKc010.map(ids);
}
}
}
package com.baosight.hggp.hg.utils;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtils;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/15,9:45
*/
public class HGUtils {
/**
* 设置查询条件
*
* @param queryRow
*/
public static void setCondition(Map queryRow) {
// 创建时间
String createdTimeFrom = MapUtils.getString(queryRow, "createdTimeFrom");
if (StringUtils.isNotBlank(createdTimeFrom)) {
queryRow.put("createdTimeFrom", DateUtils.formatShort(createdTimeFrom));
}
String createdTimeTo = MapUtils.getString(queryRow, "createdTimeTo");
if (StringUtils.isNotBlank(createdTimeTo)) {
queryRow.put("createdTimeTo", DateUtils.formatShort(createdTimeTo));
}
}
}
package com.baosight.hggp.hg.zl.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
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.zl.domain.HPZL001;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author ZJH
* @date 2024年01月09日 10:18
*/
public class ServiceHPZL001 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "质量巡检单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "质量巡检单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String receiptDate = MapUtils.getString(queryMap, "receiptDate");
queryMap.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, HPZL001.QUERY, new HPZL001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "质量巡检单",operType = "新增",operDesc = "新增")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
// 设置基础信息
this.setBaseInfo(fZl001);
// 生成单据号
fZl001.setCheckNo(SequenceGenerator.getNextSequence(
HGConstant.SequenceId.HPZL001_NUMBER));
fZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, fZl001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "质量巡检单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(fZl001.getStatus()),
String.format("单号[%s]的状态为\"已处理\"不允许修改", fZl001.getCheckNo()));
// 去除日期字符串中的-
fZl001.setReceiptDate(StringUtil.removeHorizontalLine(fZl001.getReceiptDate()));
// 设置基础信息
this.setBaseInfo(fZl001);
DaoUtils.update(HPZL001.UPDATE, fZl001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 设置基础信息
*
* @param fZl001
*/
private void setBaseInfo(HPZL001 fZl001) {
// 项目名称
// fZl001.setProjName(HPSCTools.HpSc001.get(fZl001.getProjCode()).getProjName());
// 部件名称
// fZl001.setInventName(HPSCTools.HpSc002.get(fZl001.getInventCode()).getPrdtName());
// 零件名称
// fZl001.setSubInventName(HPSCTools.HpSc002.get(fZl001.getSubInventCode()).getPrdtName());
// 生产组名称
// fZl001.setOrgName(HPXSTools.XsOrg.get(fZl001.getOrgNo()).getOrgCname());
// 检查人名称
// fZl001.setCheckUser(UserSession.getLoginName());
// fZl001.setCheckUserName(UserSession.getLoginCName());
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "质量巡检单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(fZl001.getStatus()),
String.format("单号[%s]的状态为\"已处理\"不允许删除", fZl001.getCheckNo()));
DaoUtils.update(HPZL001.DELETE, resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 已处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "质量巡检单",operType = "修改",operDesc = "已处理")
public EiInfo doProcess(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001 fZl001 = new HPZL001();
fZl001.fromMap(resultRows.get(i));
/* fZl001.setCheckUser(UserSession.getLoginName());
fZl001.setCheckUserName(UserSession.getLoginCName());*/
fZl001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGSqlConstant.HPZL001.DO_PROCESS, fZl001);
}
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.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.zl.domain.HPZL001;
import com.baosight.hggp.hg.zl.domain.HPZL001A;
import com.baosight.hggp.hg.zl.tools.HPZLTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
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.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPZL001A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单", operType = "查询", operDesc = "质量巡检单-附件清单-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
// 查询物料ID所对应的项目名称和部件名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("id", queryMap.get("checkId"));
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
if (CollectionUtils.isNotEmpty(dbZl001s)) {
inInfo.addBlock("detail").addRow(dbZl001s.get(0));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL001A().eiMetadata);
}
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单", operType = "查询", operDesc = "质量巡检单-附件清单-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HPZL001A.queryRun", new HPZL001A());
} else {
inInfo = super.query(inInfo, "HPZL001A.queryDev", new HPZL001A());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单", operType = "新增", operDesc = "质量巡检单-附件清单-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001A fZl001A = new HPZL001A();
fZl001A.fromMap(resultRows.get(i));
// 校验质检单是否已处理
HPZL001 dbZl001 = HPZLTools.getById(fZl001A.getCheckId());
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(dbZl001.getStatus()),
String.format("质检单[%s]状态为\"已处理\",不能上传附件", dbZl001.getCheckNo()));
DaoUtils.insert(HPZL001A.INSERT, fZl001A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单", operType = "删除", operDesc = "质量巡检单-附件清单-删除操作")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPZL001A fZl001A = new HPZL001A();
fZl001A.fromMap(resultRows.get(i));
// 校验质检单是否已处理
HPZL001 dbZl001 = HPZLTools.getById(fZl001A.getCheckId());
AssertUtils.isTrue(CommonConstant.YesNo.YES_1.equals(dbZl001.getStatus()),
String.format("质检单[%s]状态为\"已处理\",不能删除附件", dbZl001.getCheckNo()));
DaoUtils.update(HPZL001A.DELETE, fZl001A);
}
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.common.ProdOrderStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.zl.domain.HPZL001;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
* 选择生产任务
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPZL001B extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务查询", operType = "查询", operDesc = "质量巡检单-生产任务查询-初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
// inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务查询", operType = "查询", operDesc = "质量巡检单-生产任务查询-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
// 1.部分派工,2.全部派工
queryMap.put("statuses", new Integer[]{1, 2});
// inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 生成巡检单
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务查询", operType = "新增", operDesc = "质量巡检单-生产任务查询-生成巡检单")
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 订单号
List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo");
// 任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
// 锁订单
// HPSCTools.HpSc005.lock(prodOrderNos);
// 锁任务
// HPSCTools.HpSc005a.lock(prodTaskNos);
// 查询任务信息
// Map<String, HPSC005B> dbSc005bMap = HPSCTools.HpSc005b.map(prodTaskNos);
// 数据校验
// for (Map row : resultRows) {
// HPSC005B fSc005b = new HPSC005B();
// fSc005b.fromMap(row);
// HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
// AssertUtils.isTrue(ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005b.getStatus()),
// String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId()));
// }
// 生成巡检单
// for (Map row : resultRows) {
// Integer poorType = MapUtils.getInteger(row, "poorType");
// String problemDesc = MapUtils.getString(row, "problemDesc");
// HPSC005B fSc005b = new HPSC005B();
// fSc005b.fromMap(row);
// 生成新数据
// HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
// HPZL001 newZl001 = BeanUtils.copy(dbSc005b, HPZL001.class);
// newZl001.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPZL001_NUMBER));
// newZl001.setReceiptDate(DateUtils.shortDate());
// newZl001.setStatus(CommonConstant.YesNo.NO_0);
// newZl001.setInventCode(dbSc005b.getPrdtCode());
// newZl001.setInventName(dbSc005b.getPrdtName());
// newZl001.setSubInventCode(dbSc005b.getPartCode());
// newZl001.setSubInventName(dbSc005b.getPartName());
// newZl001.setPoorType(poorType);
// newZl001.setProblemDesc(problemDesc);
// newZl001.setProdOrderNo(dbSc005b.getProdOrderNo());
// newZl001.setProdTaskNo(dbSc005b.getProdTaskNo());
// newZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
// newZl001.setCheckUser(UserSession.getLoginName());
// newZl001.setCheckUserName(UserSession.getLoginCName());
// newZl001.setFactoryCode(dbSc005b.getFactoryCode());
// newZl001.setFactoryName(dbSc005b.getFactoryName());
// DaoUtils.insert(HPZL001.INSERT, newZl001);
// }
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "生成巡检单失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPZL001">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHECK_NO as "checkNo", <!-- 检查单号 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目号 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
POOR_TYPE as "poorType", <!-- 不良品类 -->
PROBLEM_DESC as "problemDesc", <!-- 质量问题描述 -->
CHECK_USER as "checkUser", <!-- 检查人 -->
CHECK_USER_NAME as "checkUserName", <!-- 检查人名称 -->
STATUS as "status", <!-- 单据状态 0未处理 1已处理 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除 -->
</sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventCode">
SUB_INVENT_CODE = #subInventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventName">
SUB_INVENT_NAME LIKE CONCAT('%', #subInventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME LIKE CONCAT('%', #orgName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="poorType">
POOR_TYPE = #poorType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkUser">
CHECK_USER = #checkUser#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkUserName">
CHECK_USER_NAME LIKE CONCAT('%', #checkUserName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001">
SELECT
<include refid="column"/>
FROM hpjx.t_hpzl001 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpzl001 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hpzl001 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
RECEIPT_DATE, <!-- 单据日期 -->
CHECK_NO, <!-- 检查单号 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROD_TASK_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目号 -->
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 工厂 -->
ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 -->
POOR_TYPE, <!-- 不良品类 -->
PROBLEM_DESC, <!-- 质量问题描述 -->
CHECK_USER , <!-- 检查人 -->
CHECK_USER_NAME, <!-- 检查人名称 -->
STATUS, <!-- 单据状态 0未处理 1已处理 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG <!-- 是否删除 -->
) VALUES (
#companyCode#, #depCode#, #receiptDate#, #checkNo#, #prodOrderNo#, #prodTaskNo#,
#projCode#, #projName#, #inventCode#, #inventName#, #subInventCode#, #subInventName#,#factoryCode#,#factoryName#,
#orgNo#, #orgName#, #poorType#, #problemDesc#,#checkUser#,#checkUserName#, #status#,
#createdBy#, #createdName#, #createdTime#, #deleteFlag#)
</insert>
<!-- 逻辑删除-->
<delete id="delete">
UPDATE hpjx.t_hpzl001
SET DELETE_FLAG = 1,
<include refid="updateRevise"/>
WHERE ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpzl001
SET
POOR_TYPE = #poorType#, <!-- 不良品类 -->
PROBLEM_DESC = #problemDesc#, <!-- 质量问题描述 -->
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
<!-- 已处理 -->
<update id="doProcess">
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
<!-- 移动端已处理 -->
<update id="doProcess2">
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#,
CHECK_USER = #checkUser#, <!-- 检查人 -->
CHECK_USER_NAME = #checkUserName#, <!-- 检查人名称 -->
<include refid="updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
<!-- 更新附件信息 -->
<update id="updateAffix">
UPDATE hpjx.t_hpzl001
SET
AFFIX = #affix#, <!-- 附件 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPZL001A">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.CHECK_ID as "checkId", <!-- 检查单ID -->
A.DOC_TYPE as "docType", <!-- 文件类型 -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime"<!-- 修改时间 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkId">
A.CHECK_ID = #checkId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docType">
A.DOC_TYPE = #docType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001A">
SELECT
<include refid="columnDev"/>
FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001A">
SELECT
<include refid="columnRun"/>
FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL001A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPZL001A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
CHECK_ID, <!-- 巡检单ID -->
DOC_TYPE, <!-- 文件类型 -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #checkId#, #docType#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPZL001A WHERE ID = #id#
</delete>
</sqlMap>
package com.baosight.hggp.hg.zl.tools;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.zl.domain.HPZL001;
import com.baosight.hggp.util.AssertUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/2/4,11:23
*/
public class HPZLTools {
/**
* 查询
*
* @param id
* @return
*/
public static HPZL001 getById(Long id) {
AssertUtils.isNull(id, "质检单号不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("质检单[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询
*
* @param checkNo
* @return
*/
public static HPZL001 get(String checkNo) {
AssertUtils.isEmpty(checkNo, "质检单号不能为空");
Map queryMap = new HashMap();
queryMap.put("checkNo", checkNo);
List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("质检单号[%s]信息不存在", checkNo));
return results.get(0);
}
}
......@@ -19,7 +19,9 @@
<!-- 库存 -->
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC003.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC011.xml"/>
<!-- 生产 -->
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC001A.xml"/>
......
......@@ -33,7 +33,7 @@
filter="contains">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="是否删除" blockId="inqu_status" ename="deleteFlag" row="0" colWidth="3" optionlabel="全部"
<EF:EFSelect cname="是否删除" blockId="inqu_status" ename="deleteFlag" row="0" colWidth="3" optionLabel="全部"
defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
......
$(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
// 查询
$("#QUERY").on("click", query);
// 选择生产任务
$("#SELECT_TASK").on("click", selectTask);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 选择生产任务
*/
let selectTask = function () {
JSColorbox.open({
href: "HGKC003A?methodName=initLoad",
title: "<div style='text-align: center;'>生产任务查询</div>",
width: "80%",
height: "80%",
callbackName: selectTaskCallback
});
}
/**
* 挑选库存回调
*/
let selectTaskCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
<!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:EFDatePicker cname="单据日期" ename="documentDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="是否删除" ename="deleteFlag" blockId="inqu_status" row="0" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="depositDate" cname="单据日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="invQty" cname="数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invQeight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
let whNameGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "whCode",
template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return whNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [3]);
inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HPPZ007");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "wh_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 确认选择
$("#CONFIRM").on("click", select);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
// 仓库名称
initWh()
});
/**
* 初始化仓库
*/
let initWh = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [3]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
}
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
};
/**
* 选择库存
*/
let select = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let whCode = rows[i]['whCode'];
let applyNum = rows[i]['applyNum'];
let num = rows[i]['num'];
let completeNum = rows[i]['completeNum'];
if (isBlank(whCode)) {
message("第" + (i + 1) + "行请选择仓库名称");
return;
}
if (!isPositiveInteger(applyNum)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数");
return;
}
if (parseFloat(applyNum) > parseFloat(num) - parseFloat(completeNum)) {
message("第" + (i + 1) + "行申请数量不能大于未入库的数量");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成入库单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPKC003A", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!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="查询区域" type="query">
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="4"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="4"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="4"/>
</div>
<div class="row">
<EF:EFSelect cname="工厂" blockId="inqu_status" ename="factoryCode" row="0" colWidth="4"
filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="生产组" blockId="inqu_status" ename="groupCode" row="0" colWidth="4" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="applyNum" cname="入库数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="remark1" cname="入库说明" width="150"/>
<EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N0}"
hidden="true"/>
<EF:EFColumn ename="unCompleteNum" cname="待入库数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="任务重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
exportGrid: false, // 隐藏右侧自定义导出按钮
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
columns: []
},
};
......
......@@ -8,20 +8,26 @@
<EF:EFPage title="综合库存管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3"
optionLabel="全部" filter="contains" defultValue="">
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="incentType" row="0" colWidth="3" optionLabel="全部"
filter="contains" defultValue="">
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="incentType" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="incentCode" row="0" colWidth="3" optionLabel="全部"
filter="contains" defultValue="">
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="incentCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3" optionLabel="全部"
filter="contains" defultValue="">
</div>
<div class="row">
<EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
columns: []
},
};
// 查询
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第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:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="部件名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="零件名称" blockId="inqu_status" ename="subInventCode" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" enable="false" width="110" align="center">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="center">
<EF:EFOptions blockId="wh_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="invQty" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(T)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
<EF:EFColumn ename="updatedBy" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
let projNameGlobalData = [];
let inventNameGlobalData = [];
let subInventNameGlobalData = [];
let orgNameGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
input: true,
numeric: false,
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "receiptDate",
attributes: {
class: "i-input-readonly"
}
}, {
field: "operator",
template: function (item) {
let status = item.status;
if (status === "0") {
return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
'onclick="doProcess(' + item.id + ', \'' + item.checkNo + '\')" >处理</a>';
} else {
return "";
}
}
}, {
field: "problemPhoto",
template: function (item) {
if (!isBlank(item.checkNo)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ', 1)" >附件清单</a>';
} else {
return "";
}
}
}, {
field: "processPhoto",
template: function (item) {
if (!isBlank(item.checkNo)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ', 2)" >附件清单</a>';
} else {
return "";
}
}
},
// {
// field: "projCode",
// template: function (dataItem) {
// for (let i = 0; i < projNameGlobalData.length; i++) {
// if (projNameGlobalData[i]['valueField'] === dataItem['projCode']) {
// return projNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let inInfo = new EiInfo();
// // 1.部分分派,2.全部分派
// inInfo.set("inqu_status-0-statuses", [1, 2]);
// inInfo.set("serviceName", "HPSC005");
// inInfo.set("methodName", "queryProjComboBox");
// inInfo.set("blockId", "proj_prod_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "inventCode",
// template: function (dataItem) {
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
// return inventNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let projCode = options.model["projCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-projCode", isBlank(projCode) ? " " : projCode);
// inInfo.set("serviceName", "HPSC003");
// inInfo.set("methodName", "queryInventComboBox");
// inInfo.set("blockId", "invent_record_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "subInventCode",
// template: function (dataItem) {
// for (let i = 0; i < subInventNameGlobalData.length; i++) {
// if (subInventNameGlobalData[i]['valueField'] === dataItem['subInventCode']) {
// return subInventNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let inventCode = options.model["inventCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-parentPrdtCode", isBlank(inventCode) ? " " : inventCode);
// inInfo.set("serviceName", "HPSC004");
// inInfo.set("methodName", "queryInventComboBox");
// inInfo.set("blockId", "sub_invent_record_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// }, {
// field: "orgNo",
// template: function (dataItem) {
// for (let i = 0; i < orgNameGlobalData.length; i++) {
// if (orgNameGlobalData[i]['valueField'] === dataItem['orgNo']) {
// return orgNameGlobalData[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let subInventCode = options.model["subInventCode"];
// let inInfo = new EiInfo();
// inInfo.set("inqu_status-0-prdtCode", isBlank(subInventCode) ? " " : subInventCode);
// inInfo.set("serviceName", "HPSC005");
// inInfo.set("methodName", "queryOrgComboBox");
// inInfo.set("blockId", "org_prod_block_id");
// inInfo.set("field", options.field);
// refreshSelect(container, inInfo);
// }
// },
{
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}],
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
// 查询
$("#QUERY").on("click", query);
// 选择生产任务
$("#SELECT_PROD").on("click", selectProd);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 项目名称
// let inInfo = new EiInfo();
// EiCommunicator.send("HPSC001", "queryComboBox", inInfo, {
// onSuccess: function (ei) {
// projNameGlobalData = ei.getBlock("proj_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 部件名称
// EiCommunicator.send("HPSC003", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// inventNameGlobalData = ei.getBlock("invent_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 零件名称
// EiCommunicator.send("HPSC004", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// subInventNameGlobalData = ei.getBlock("sub_invent_record_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// // 生产组名称
// EiCommunicator.send("HPSC005", "queryOrgComboBox", inInfo, {
// onSuccess: function (ei) {
// orgNameGlobalData = ei.getBlock("org_prod_block_id").getMappedRows();
// },
// onFail: function (ei) {
// }
// }, {async: false});
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 显示附件清单
*
* @param id
* @param docType
*/
let showUploadFile = function (id, docType) {
JSColorbox.open({
href: "HPZL001A?methodName=initLoad&inqu_status-0-checkId=" + id + "&inqu_status-0-docType=" + docType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
/**
* 提交操作
*
* @param id
* @param checkNo
*/
let doProcess = function (id, checkNo) {
let message = "确认将单号[" + checkNo + "]的状态修改为已处理吗? ";
JSUtils.confirm(message, {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001", "doProcess", true);
}
});
}
/**
* 挑选生产任务
*/
let selectProd = function () {
JSColorbox.open({
href: "HPZL001B?methodName=initLoad",
title: "<div style='text-align: center;'>生产任务查询</div>",
width: "90%",
height: "80%",
callbackName: selectStockCallback
});
}
/**
* 挑选生产任务回调
*/
let selectStockCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("status");
if(status==="1"){
message("选中的第"+(index+1)+"行记录已处理,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001", "delete", 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:EFDatePicker cname="单据日期" ename="receiptDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="工作组" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="检查人" ename="checkUserName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="不良类型" ename="poorType" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFSelect>
<EF:EFSelect cname="处理状态" ename="status" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="已处理" value="1"></EF:EFOption>
<EF:EFOption label="未处理" value="0"></EF:EFOption>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="problemPhoto" cname="问题照片" locked="true" enable="false" width="100" align="center"
required="true"/>
<EF:EFColumn ename="processPhoto" cname="处理照片" locked="true" enable="false" width="100" align="center"
required="true"/>
<EF:EFColumn ename="checkNo" cname="检查单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center">
<EF:EFOption label="已处理" value="1"></EF:EFOption>
<EF:EFOption label="未处理" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="problemDesc" cname="质量问题描述" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="checkUser" cname="检查人" enable="false" width="120" align="center"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="150" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let docId = item.docId;
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 隐藏按钮
let status = $("#detail-0-status").val();
if (status == "1") {
$("#UPLOAD_FILE").hide();
$("#BTN_DELETE").hide();
}
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-checkId", $("#inqu_status-0-checkId").val());
inEiInfo.set("result-0-docType", $("#inqu_status-0-docType").val());
inEiInfo.set("result-0-docId", docId);
EiCommunicator.send('HPZL001A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001A", "delete", 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="查询区域" type="query">
<EF:EFInput cname="质量巡检单ID" ename="checkId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="附件类型" ename="docType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="生产组" ename="orgName" blockId="detail" row="0" colWidth="3" readonly="true"/>
</div>
<EF:EFInput cname="状态" ename="status" blockId="detail" row="0" colWidth="3" type="hidden"/>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 选择
$("#BTN_SELECT").on("click", select);
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
};
/**
* 选择库存
*/
let select = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let poorType = rows[i]['poorType'];
let problemDesc = rows[i]['problemDesc'];
if (isBlank(poorType)) {
message("第" + (i + 1) + "行不良品类不能为空");
return;
}
if (isBlank(problemDesc)) {
message("第" + (i + 1) + "行质量问题描述不能为空");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成巡检单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001B", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!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="查询区域" type="query">
<div class="row">
<div class="row">
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="problemDesc" cname="质量问题描述" width="140" required="true"/>
<EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="任务重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</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