Commit 51b8d56f by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into dev-sx

parents 10bc84d0 69135b39
...@@ -216,8 +216,6 @@ public class ServiceHGCG002 extends ServiceBase { ...@@ -216,8 +216,6 @@ public class ServiceHGCG002 extends ServiceBase {
HGCGTools.HgCg001A.updateStatus(hgcg002B.getPlanDetailId(), HGConstant.CgPlanStatus.S_2); HGCGTools.HgCg001A.updateStatus(hgcg002B.getPlanDetailId(), HGConstant.CgPlanStatus.S_2);
} }
} }
} }
/** /**
...@@ -244,7 +242,7 @@ public class ServiceHGCG002 extends ServiceBase { ...@@ -244,7 +242,7 @@ public class ServiceHGCG002 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 数据校验 * 数据校验
* *
...@@ -256,16 +254,17 @@ public class ServiceHGCG002 extends ServiceBase { ...@@ -256,16 +254,17 @@ public class ServiceHGCG002 extends ServiceBase {
String contractNo = fCg002.getContractNo(); String contractNo = fCg002.getContractNo();
HGCG002 dbCg002 = dbCg002AMap.get(contractNo); HGCG002 dbCg002 = dbCg002AMap.get(contractNo);
AssertUtils.isNull(dbCg002, String.format("合同[%s]不存在", contractNo)); AssertUtils.isNull(dbCg002, String.format("合同[%s]不存在", contractNo));
AssertUtils.isTrue(StringUtils.isBlank(fCg002.getSupName()), String.format("合同[%s]供应商为空", contractNo)); AssertUtils.isEmpty(dbCg002.getSupName(), String.format("合同[%s]供应商为空", contractNo));
AssertUtils.isTrue(StringUtils.isBlank(fCg002.getPurUserName()), String.format("合同[%s]采购员为空", contractNo)); AssertUtils.isEmpty(dbCg002.getPurUserName(), String.format("合同[%s]采购员为空", contractNo));
AssertUtils.isNotEquals(HGConstant.CgContractStatus.S_0, dbCg002.getStatus(), AssertUtils.isNotEquals(HGConstant.CgContractStatus.S_0, dbCg002.getStatus(),
String.format("合同[%s]状态不是\"待审核\",不允许操作", contractNo)); String.format("合同[%s]状态不是\"待审核\",不允许操作", contractNo));
AssertUtils.isTrue(fCg002.getAmount().compareTo(BigDecimal.ZERO) <= 0, String.format("合同[%s]不含税金额小于等于0,不允许操作", contractNo)); AssertUtils.isTrue(dbCg002.getAmount().compareTo(BigDecimal.ZERO) <= 0,
AssertUtils.isTrue(fCg002.getTaxIncludeAmount().compareTo(BigDecimal.ZERO) <= 0, String.format("合同[%s]含税金额小于等于0,不允许操作", contractNo)); String.format("合同[%s]不含税金额小于等于0,不允许操作", contractNo));
AssertUtils.isTrue(dbCg002.getTaxIncludeAmount().compareTo(BigDecimal.ZERO) <= 0,
String.format("合同[%s]含税金额小于等于0,不允许操作", contractNo));
} }
} }
/** /**
* 提交数据 * 提交数据
* *
......
...@@ -143,22 +143,26 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -143,22 +143,26 @@ public class ServiceHGCG003A extends ServiceBase {
Long id = fCg002B.getId(); Long id = fCg002B.getId();
HGCG002B dbCg002b = dbCg002BMap.get(id); HGCG002B dbCg002b = dbCg002BMap.get(id);
// 总重 // 总重
BigDecimal bcReceiveQty = fCg002B.getBcReceiveQty();
BigDecimal bcReceiveWeight = fCg002B.getBcReceiveWeight(); BigDecimal bcReceiveWeight = fCg002B.getBcReceiveWeight();
if (bcReceiveWeight == null || bcReceiveWeight.compareTo(BigDecimal.ZERO) == 0) { if (bcReceiveWeight == null || bcReceiveWeight.compareTo(BigDecimal.ZERO) == 0) {
fCg002B.setReceiveWeight(fCg002B.getBcReceiveQty().multiply(dbCg002b.getPurUnitWeight())); fCg002B.setReceiveWeight(bcReceiveQty.multiply(dbCg002b.getPurUnitWeight()));
fCg002B.setPurUnitWeight(dbCg002b.getPurUnitWeight());
} else { } else {
fCg002B.setReceiveWeight(bcReceiveWeight); fCg002B.setReceiveWeight(bcReceiveWeight);
fCg002B.setPurUnitWeight(bcReceiveWeight.divide(bcReceiveQty, 3, RoundingMode.HALF_UP));
} }
// 含税总金额 // 含税总金额
BigDecimal amount; BigDecimal amount;
if (HgCgConst.CalculationMethod.S1.equals(fCg002B.getCalculationMethod())) { if (HgCgConst.CalculationMethod.S1.equals(fCg002B.getCalculationMethod())) {
amount = fCg002B.getReceiveWeight().multiply(dbCg002b.getPrice()); amount = bcReceiveWeight.multiply(dbCg002b.getPrice());
} else { } else {
amount = fCg002B.getBcReceiveQty().multiply(dbCg002b.getPrice()); amount = bcReceiveQty.multiply(dbCg002b.getPrice());
} }
// 如果税率不为空,总金额减去税额 // 如果税率不为空,总金额减去税额
if (dbCg002b.getTaxRate() != null) { if (dbCg002b.getTaxRate() != null) {
amount = amount.subtract(amount.multiply(dbCg002b.getTaxRate()).divide(new BigDecimal("100"))); BigDecimal taxRate = dbCg002b.getTaxRate().multiply(new BigDecimal("0.01")).add(BigDecimal.ONE);
amount = amount.divide(taxRate, 2, RoundingMode.HALF_UP);
} }
fCg002B.setAmount(amount); fCg002B.setAmount(amount);
} }
......
...@@ -2,11 +2,50 @@ ...@@ -2,11 +2,50 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCG002A"> <sqlMap namespace="HGCG002A">
<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", <!-- 公司名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT as "taxIncludeAmount", <!-- 含税金额 -->
TAX_AMOUNT as "taxAmount", <!-- 税额 -->
TAX_RATE as "taxRate", <!-- 税率 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 -->
PRIMARY_ID as "primaryId", <!-- 主表id -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
PLAN_DETAIL_ID as "planDetailId", <!-- 计划明细id -->
STATUS as "status"
</sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0 AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <include refid="idCondition"/>
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode# ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
...@@ -117,6 +156,18 @@ ...@@ -117,6 +156,18 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryIds">
PRIMARY_ID IN <iterate open="(" close=")" conjunction="," property="primaryIds">#primaryIds[]#</iterate>
</isNotEmpty>
</sql>
<!-- 公共修改字段 --> <!-- 公共修改字段 -->
<sql id="updateRevise"> <sql id="updateRevise">
UPDATED_BY = #updatedBy#, UPDATED_BY = #updatedBy#,
...@@ -124,75 +175,29 @@ ...@@ -124,75 +175,29 @@
UPDATED_TIME = #updatedTime# UPDATED_TIME = #updatedTime#
</sql> </sql>
<sql id="idCondition"> <sql id="orderBy">
<isNotEmpty prepend=" AND " property="id"> <dynamic prepend="ORDER BY">
ID = #id# <isNotEmpty property="orderBy">
</isNotEmpty> $orderBy$
<isNotEmpty prepend=" AND " property="ids"> </isNotEmpty>
ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate> <isEmpty property="orderBy">
</isNotEmpty> ID asc
<isNotEmpty prepend=" AND " property="primaryIds"> </isEmpty>
PRIMARY_ID IN <iterate open="(" close=")" conjunction="," property="primaryIds">#primaryIds[]#</iterate> </dynamic>
</isNotEmpty> </sql>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.cg.domain.HGCG002B"> <select id="query" resultClass="com.baosight.hggp.hg.cg.domain.HGCG002B">
SELECT SELECT
ID as "id", <include refid="column"/>
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> FROM ${hggpSchema}.HGCG002A WHERE 1=1
DEP_CODE as "depCode", <!-- 部门编码 --> <include refid="condition"/>
CREATED_BY as "createdBy", <!-- 记录创建者 --> <include refid="orderBy"/>
CREATED_NAME as "createdName", <!-- 记录创建名称 --> </select>
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", <!-- 公司名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT as "taxIncludeAmount", <!-- 含税金额 -->
TAX_AMOUNT as "taxAmount", <!-- 税额 -->
TAX_RATE as "taxRate", <!-- 税率 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 -->
PRIMARY_ID as "primaryId", <!-- 主表id -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
PLAN_DETAIL_ID as "planDetailId", <!-- 计划明细id -->
STATUS as "status"
FROM ${hggpSchema}.HGCG002A WHERE 1=1
<include refid="condition" />
<include refid="idCondition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCG002A WHERE 1=1 SELECT COUNT(*) FROM ${hggpSchema}.HGCG002A WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCG002A (ID, INSERT INTO ${hggpSchema}.HGCG002A (ID,
...@@ -292,60 +297,59 @@ ...@@ -292,60 +297,59 @@
<include refid="idCondition"/> <include refid="idCondition"/>
</update> </update>
<select id="queryByReceive" resultClass="com.baosight.hggp.hg.cg.domain.HGCG002B"> <select id="queryByReceive" resultClass="com.baosight.hggp.hg.cg.domain.HGCG002B">
SELECT SELECT
a.ID as "id", a.ID as "id",
a.ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> a.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
a.DEP_CODE as "depCode", <!-- 部门编码 --> a.DEP_CODE as "depCode", <!-- 部门编码 -->
a.CREATED_BY as "createdBy", <!-- 记录创建者 --> a.CREATED_BY as "createdBy", <!-- 记录创建者 -->
a.CREATED_NAME as "createdName", <!-- 记录创建名称 --> a.CREATED_NAME as "createdName", <!-- 记录创建名称 -->
a.CREATED_TIME as "createdTime", <!-- 记录创建时间 --> a.CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
a.UPDATED_BY as "updatedBy", <!-- 记录修改者 --> a.UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
a.UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> a.UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
a.UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> a.UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
a.DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 --> a.DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
a.COMPANY_CODE as "companyCode", <!-- 公司编码 --> a.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
a.COMPANY_NAME as "companyName", <!-- 公司名称 --> a.COMPANY_NAME as "companyName", <!-- 公司名称 -->
a.INVENT_TYPE as "inventType", <!-- 存货类型 --> a.INVENT_TYPE as "inventType", <!-- 存货类型 -->
a.INVENT_CODE as "inventCode", <!-- 存货编码 --> a.INVENT_CODE as "inventCode", <!-- 存货编码 -->
a.INVENT_NAME as "inventName", <!-- 存货名称 --> a.INVENT_NAME as "inventName", <!-- 存货名称 -->
a.SPEC as "spec", <!-- 规格 --> a.SPEC as "spec", <!-- 规格 -->
a.MATERIAL as "material", <!-- 材质 --> a.MATERIAL as "material", <!-- 材质 -->
a.UNIT as "unit", <!-- 单位 --> a.UNIT as "unit", <!-- 单位 -->
a.LENGTH as "length", <!-- 长度 --> a.LENGTH as "length", <!-- 长度 -->
a.WIDTH as "width", <!-- 宽度 --> a.WIDTH as "width", <!-- 宽度 -->
a.THICK as "thick", <!-- 厚度 --> a.THICK as "thick", <!-- 厚度 -->
a.PUR_QTY as "purQty", <!-- 采购数量 --> a.PUR_QTY as "purQty", <!-- 采购数量 -->
a.PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 --> a.PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
a.PUR_WEIGHT as "purWeight", <!-- 采购重量 --> a.PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
a.RECEIVE_QTY as "receiveQty", <!-- 收货数量 --> a.RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
a.RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 --> a.RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
a.PRICE as "price", <!-- 单价 --> a.PRICE as "price", <!-- 单价 -->
a.AMOUNT as "amount", <!-- 金额(不含税金额) --> a.AMOUNT as "amount", <!-- 金额(不含税金额) -->
a.TAX_INCLUDE_AMOUNT as "taxIncludeAmount", <!-- 含税金额 --> a.TAX_INCLUDE_AMOUNT as "taxIncludeAmount", <!-- 含税金额 -->
a.TAX_AMOUNT as "taxAmount", <!-- 税额 --> a.TAX_AMOUNT as "taxAmount", <!-- 税额 -->
a.TAX_RATE as "taxRate", <!-- 税率 --> a.TAX_RATE as "taxRate", <!-- 税率 -->
a.INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 --> a.INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 -->
a.PRIMARY_ID as "primaryId", <!-- 主表id --> a.PRIMARY_ID as "primaryId", <!-- 主表id -->
(a.PUR_QTY - a.RECEIVE_QTY) as "bcMaxReceiveQty", (a.PUR_QTY - a.RECEIVE_QTY) as "bcMaxReceiveQty",
(a.PUR_WEIGHT - a.RECEIVE_WEIGHT) as "bcMaxReceiveWeight", (a.PUR_WEIGHT - a.RECEIVE_WEIGHT) as "bcMaxReceiveWeight",
a.PROJ_CODE as "projCode", <!-- 项目编码 --> a.PROJ_CODE as "projCode", <!-- 项目编码 -->
a.PROJ_NAME as "projName", <!-- 项目名称 --> a.PROJ_NAME as "projName", <!-- 项目名称 -->
a.CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 --> a.CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
a.STATUS as "status", <!-- 状态 --> a.STATUS as "status", <!-- 状态 -->
b.CONTRACT_DATE as "contractDate", <!-- 合同日期 --> b.CONTRACT_DATE as "contractDate", <!-- 合同日期 -->
b.CONTRACT_NO as "contractNo", <!-- 合同号 --> b.CONTRACT_NO as "contractNo", <!-- 合同号 -->
b.PLAN_NO as "planNo", <!-- 计划单号 --> b.PLAN_NO as "planNo", <!-- 计划单号 -->
b.SUP_CODE as "supCode", <!-- 供应商编码 --> b.SUP_CODE as "supCode", <!-- 供应商编码 -->
b.SUP_NAME as "supName", <!-- 供应商名称 --> b.SUP_NAME as "supName", <!-- 供应商名称 -->
b.PUR_USER_ID as "purUserId", <!-- 采购员 --> b.PUR_USER_ID as "purUserId", <!-- 采购员 -->
b.PUR_USER_NAME as "purUserName" <!-- 采购员名称 --> b.PUR_USER_NAME as "purUserName" <!-- 采购员名称 -->
FROM ${hggpSchema}.HGCG002A a FROM ${hggpSchema}.HGCG002A a
LEFT JOIN ${hggpSchema}.HGCG002 b ON a.PRIMARY_ID = b.id LEFT JOIN ${hggpSchema}.HGCG002 b ON a.PRIMARY_ID = b.id
WHERE 1=1 WHERE 1=1
AND a.DELETE_FLAG = 0 AND a.DELETE_FLAG = 0
AND b.DELETE_FLAG = 0 AND b.DELETE_FLAG = 0
AND (a.PUR_QTY - a.RECEIVE_QTY) > 0 AND (a.PUR_QTY - a.RECEIVE_QTY) > 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
a.ID = #id# a.ID = #id#
......
...@@ -268,7 +268,7 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -268,7 +268,7 @@ public class ServiceHGCW010 extends ServiceBase {
} }
catch (Exception e) { catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败"); LogUtils.setMsg(inInfo, e, "生成销售开票失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -786,7 +786,7 @@ public class HGCWTools { ...@@ -786,7 +786,7 @@ public class HGCWTools {
List<HGCW011> results = DaoBase.getInstance().query(HGCW011.QUERY,new HashMap<String,Object>(){ List<HGCW011> results = DaoBase.getInstance().query(HGCW011.QUERY,new HashMap<String,Object>(){
{put("settlementNumbers",settlementNumber);} {put("settlementNumbers",settlementNumber);}
}); });
AssertUtils.isEmpty(results, "找不到对应的销售开票记录!"); //AssertUtils.isEmpty(results, "找不到对应的销售开票记录!");
BigDecimal totalAmount = new BigDecimal("0"); BigDecimal totalAmount = new BigDecimal("0");
for (HGCW011 hgcw011: results) { for (HGCW011 hgcw011: results) {
totalAmount = totalAmount.add(hgcw011.getTotalContractPriceIncluding()); totalAmount = totalAmount.add(hgcw011.getTotalContractPriceIncluding());
......
...@@ -12,6 +12,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC001; ...@@ -12,6 +12,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC003; import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -24,6 +26,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -24,6 +26,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* @author:songx * @author:songx
...@@ -123,7 +127,13 @@ public class ServiceHGKC001 extends ServiceBase { ...@@ -123,7 +127,13 @@ public class ServiceHGKC001 extends ServiceBase {
* @param dbCg004Map * @param dbCg004Map
*/ */
private void saveData(List<HGKC001> fCg004s, Map<String, HGKC001> dbCg004Map) { private void saveData(List<HGKC001> fCg004s, Map<String, HGKC001> dbCg004Map) {
List<String> whCodeList = fCg004s.stream().map(HGKC001::getWhCode).collect(Collectors.toList());
Map<String, HGPZ007> whMap = HGPZTools.HgPz007.map(whCodeList);
for (HGKC001 fCg004 : fCg004s) { for (HGKC001 fCg004 : fCg004s) {
HGPZ007 wh = whMap.get(fCg004.getWhCode());
if(Objects.nonNull(wh)){
fCg004.setWhName(wh.getWhName());
}
DaoUtils.update(HGKC001.UPDATE_WH_CODE, fCg004); DaoUtils.update(HGKC001.UPDATE_WH_CODE, fCg004);
} }
} }
......
package com.baosight.hggp.hg.pz.constant;
/**
* @author:songx
* @date:2024/9/3,14:43
*/
public class HgPzSqlConstant {
/**
* @author:songx
* @date:2024/9/3,14:43
*/
public class HgPz005A {
// 模块名称
public static final String MODULE = "HGPZ005A.";
// 修改排产系数
public static final String UPDATE_COMPOSING_COEFF = MODULE + "updateComposingCoeff";
}
}
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.pz.constant.HgPzSqlConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
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.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils;
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.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author:songx
* @date:2024/9/3,14:28
*/
public class ServiceHGPZ005D extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ005().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String processCode = MapUtils.getString(queryMap, HGPZ005A.FIELD_PROCESS_CODE);
if (ObjectUtils.isNullBlank(processCode)) {
return inInfo;
}
inInfo = super.query(inInfo, HGPZ005.QUERY, new HGPZ005());
// 填充排产系数
List<Map> results = inInfo.getBlock(EiConstant.resultBlock).getRows();
if (CollectionUtils.isEmpty(results)) {
return inInfo;
}
List<String> inventCodes = results.stream().map(item -> MapUtils.getString(item, HGPZ005.FIELD_INVENT_CODE))
.collect(Collectors.toList());
Map<String, HGPZ005A> dbPz005AMap = HGPZTools.HgPz005A.mapByCode(inventCodes, processCode);
for (Map resultMap : results) {
String inventCode = MapUtils.getString(resultMap, HGPZ005.FIELD_INVENT_CODE);
HGPZ005A dbPz005A = dbPz005AMap.get(inventCode);
resultMap.put(HGPZ005A.FIELD_COMPOSING_COEFF, dbPz005A == null ? 1 : dbPz005A.getComposingCoeff());
}
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 保存操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "工序设置", operType = "保存", operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String processCode = MapUtils.getString(queryMap, HGPZ005A.FIELD_PROCESS_CODE);
AssertUtils.isEmpty(processCode, "请选择工序");
BigDecimal composingCoeff = MapUtils.getBigDecimal(queryMap, HGPZ005A.FIELD_COMPOSING_COEFF);
AssertUtils.isGe(BigDecimal.ZERO, composingCoeff, "排产系数必须大于0");
List<HGPZ005> fPz005s = MapUtils.toDaoEPBases(inInfo, HGPZ005.class);
List<String> inventCodes = ObjectUtils.listEpKey(fPz005s, HGPZ005A.FIELD_INVENT_CODE);
AssertUtils.isEmpty(inventCodes, "请选择材料");
// 写入数据
queryMap.put("inventCodes", inventCodes);
DaoUtils.update(HgPzSqlConstant.HgPz005A.UPDATE_COMPOSING_COEFF, queryMap);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fPz005s.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-05-07 16:07:42
Version : 1.0
schema : hggp
tableName : HGPZ005
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
INVENT_TYPE TINYINT NOT NULL,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
SPEC VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
MATERIAL VARCHAR,
COEFFICIENT DECIMAL,
UNIT VARCHAR,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HGPZ005"> <sqlMap namespace="HGPZ005">
<typeAlias alias="HGPZ005" type="com.baosight.hggp.hg.pz.domain.HGPZ005"/> <typeAlias alias="HGPZ005" type="com.baosight.hggp.hg.pz.domain.HGPZ005"/>
<sql id="column"> <sql id="column">
ID as "id", ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 --> ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", INVENT_TYPE_DETAIL as "inventTypeDetail",
INVENT_CODE as "inventCode", <!-- 存货编码 --> INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 --> SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
MATERIAL as "material", <!-- 材质 --> MATERIAL as "material", <!-- 材质 -->
COEFFICIENT as "coefficient", <!-- 系数 --> COEFFICIENT as "coefficient", <!-- 系数 -->
UNIT as "unit", <!-- 单位 --> UNIT as "unit", <!-- 单位 -->
STATUS as "status", <!-- 状态 0未启用 1启用 --> STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
FLOW_ID as "flowId" FLOW_ID as "flowId"
</sql> </sql>
<sql id="condition"> <sql id="condition">
<!-- 存货档案去除权限限制 <!-- 存货档案去除权限限制
...@@ -153,12 +128,17 @@ ...@@ -153,12 +128,17 @@
<isEqual prepend=" AND " property="isFlowId" compareValue="0"> <isEqual prepend=" AND " property="isFlowId" compareValue="0">
FLOW_ID = #isFlowId# FLOW_ID = #isFlowId#
</isEqual> </isEqual>
<isNotEmpty prepend=" AND " property="processCode">
INVENT_CODE IN (SELECT INVENT_CODE FROM ${hggpSchema}.HGPZ005A WHERE PROCESS_CODE = #processCode#)
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGPZ005"> <select id="query" parameterClass="java.util.HashMap" resultClass="HGPZ005">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM ${hggpSchema}.HGPZ005 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ005
WHERE 1=1
AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -175,79 +155,6 @@ ...@@ -175,79 +155,6 @@
<include refid="condition" /> <include refid="condition" />
</select> </select>
<!--<select id="get" resultClass="HGPZ005">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGPZ005 WHERE 1=1
<include refid="condition"/>
</select>-->
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</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="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coefficient">
COEFFICIENT = #coefficient#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</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>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ005 (ID, INSERT INTO ${hggpSchema}.HGPZ005 (ID,
ACCOUNT_CODE, <!-- 帐套编码 --> ACCOUNT_CODE, <!-- 帐套编码 -->
...@@ -463,6 +370,7 @@ ...@@ -463,6 +370,7 @@
<include refid="condition"/> <include refid="condition"/>
ORDER BY ID ORDER BY ID
</select> </select>
<!-- 规格下拉框(无ID) --> <!-- 规格下拉框(无ID) -->
<select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-15 18:59:20
Version : 1.0
schema : hggp
tableName : HGPZ005A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
PROCESS_CODE VARCHAR NOT NULL,
PROCESS_NAME VARCHAR NOT NULL,
COMPOSING_COEFF VARCHAR,
UNIT_COEFF VARCHAR,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGPZ005A"> <sqlMap namespace="HGPZ005A">
<sql id="condition"> <sql id="condition">
<!--<include refid="HGXSDataAuth.authCondition"/>--> <!--<include refid="HGXSDataAuth.authCondition"/>-->
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -90,9 +69,8 @@ ...@@ -90,9 +69,8 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" resultClass="com.baosight.hggp.hg.pz.domain.HGPZ005A">
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ005A"> SELECT
SELECT
ID as "id", ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 --> ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
...@@ -132,57 +110,6 @@ ...@@ -132,57 +110,6 @@
<include refid="condition" /> <include refid="condition" />
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<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>
<isNotEmpty prepend=" AND " property="processCode">
PROCESS_CODE = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
PROCESS_NAME = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="composingCoeff">
COMPOSING_COEFF = #composingCoeff#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitCoeff">
UNIT_COEFF = #unitCoeff#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processClass">
PROCESS_CLASS = #processClass#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ005A (ID, INSERT INTO ${hggpSchema}.HGPZ005A (ID,
ACCOUNT_CODE, <!-- 帐套编码 --> ACCOUNT_CODE, <!-- 帐套编码 -->
...@@ -259,4 +186,15 @@ ...@@ -259,4 +186,15 @@
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- 修改排产系数 -->
<update id="updateComposingCoeff">
UPDATE ${hggpSchema}.HGPZ005A
SET
COMPOSING_COEFF = #composingCoeff#,
<include refid="SqlBase.updateRevise"/>
WHERE DELETE_FLAG = 0
AND PROCESS_CODE = #processCode#
AND INVENT_CODE IN <iterate close=")" open="(" conjunction="," property="inventCodes">#inventCodes[]#</iterate>
</update>
</sqlMap> </sqlMap>
...@@ -146,11 +146,11 @@ public class HGPZTools { ...@@ -146,11 +146,11 @@ public class HGPZTools {
} }
return pz004s.stream().collect(Collectors.toMap(HGPZ004::getInventType, item -> item)); return pz004s.stream().collect(Collectors.toMap(HGPZ004::getInventType, item -> item));
} }
} }
public static class HgPz006 { public static class HgPz006 {
public static HGPZ006 getWhCode(String wHCode) { public static HGPZ006 getWhCode(String wHCode) {
HGPZ007 pz007 = HGPZTools.HgPz007.get(wHCode); HGPZ007 pz007 = HGPZTools.HgPz007.get(wHCode);
if (pz007 == null) { if (pz007 == null) {
...@@ -698,15 +698,19 @@ public class HGPZTools { ...@@ -698,15 +698,19 @@ public class HGPZTools {
pz005.setUnit(hgsc009a.getUnit()); pz005.setUnit(hgsc009a.getUnit());
pz005.setStatus(1); //默认启用 pz005.setStatus(1); //默认启用
jointSpec(pz005); jointSpec(pz005);
DaoUtils.insert(HGPZ005.INSERT,pz005); DaoUtils.insert(HGPZ005.INSERT, pz005);
return pz005; return pz005;
} }
} }
/**
* @author:songx
* @date:2024/9/3,16:35
*/
public static class HgPz005A { public static class HgPz005A {
/** /**
* 通过存货编码查询存货工序* * 通过存货编码查询存货工序*
* *
...@@ -720,7 +724,7 @@ public class HGPZTools { ...@@ -720,7 +724,7 @@ public class HGPZTools {
List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap); List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results; return CollectionUtils.isEmpty(results) ? null : results;
} }
/** /**
* 通过存货编码查询存货工序* * 通过存货编码查询存货工序*
* *
...@@ -734,7 +738,7 @@ public class HGPZTools { ...@@ -734,7 +738,7 @@ public class HGPZTools {
List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap); List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results; return CollectionUtils.isEmpty(results) ? null : results;
} }
/** /**
* 通过存货编码查询存货工序* * 通过存货编码查询存货工序*
* *
...@@ -748,6 +752,33 @@ public class HGPZTools { ...@@ -748,6 +752,33 @@ public class HGPZTools {
List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap); List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results; return CollectionUtils.isEmpty(results) ? null : results;
} }
/**
* @param inventCodes
* @param processCode
* @return
*/
public static List<HGPZ005A> listByCode(List<String> inventCodes, String processCode) {
AssertUtils.isEmpty(inventCodes, "存货编码不能为空");
AssertUtils.isEmpty(processCode, "工序编码不能为空");
Map queryMap = new HashMap();
queryMap.put("inventCodes", inventCodes);
queryMap.put("processCode", processCode);
return DaoBase.getInstance().query(HGPZ005A.QUERY, queryMap);
}
/**
* @param inventCodes
* @param processCode
* @return
*/
public static Map<String, HGPZ005A> mapByCode(List<String> inventCodes, String processCode) {
List<HGPZ005A> results = listByCode(inventCodes, processCode);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HGPZ005A::getInventCode, item -> item));
}
} }
/** /**
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -307,7 +308,8 @@ ...@@ -307,7 +308,8 @@
STATUS as "status", STATUS as "status",
DELETE_FLAG as "deleteFlag", DELETE_FLAG as "deleteFlag",
COST_WEIGHT as "costWeight" COST_WEIGHT as "costWeight"
FROM ${hggpSchema}.HGGY001 WHERE 1=1 FROM ${hggpSchema}.HGGY001
WHERE 1=1
<include refid="condition" /> <include refid="condition" />
group by PROCESS_CODE, PROCESS_NAME, FACTORY_CODE, FACTORY_NAME, UNIT, STATUS, DELETE_FLAG, COST_WEIGHT group by PROCESS_CODE, PROCESS_NAME, FACTORY_CODE, FACTORY_NAME, UNIT, STATUS, DELETE_FLAG, COST_WEIGHT
</select> </select>
......
...@@ -183,7 +183,7 @@ public class AssertUtils { ...@@ -183,7 +183,7 @@ public class AssertUtils {
* @param message * @param message
*/ */
public static void isGt(BigDecimal a, BigDecimal b, String message) { public static void isGt(BigDecimal a, BigDecimal b, String message) {
if (a.compareTo(b) == 1) { if (a == null || b == null || a.compareTo(b) == 1) {
throw new PlatException(message); throw new PlatException(message);
} }
} }
...@@ -195,7 +195,7 @@ public class AssertUtils { ...@@ -195,7 +195,7 @@ public class AssertUtils {
* @param b * @param b
*/ */
public static void isGe(BigDecimal a, BigDecimal b, String message) { public static void isGe(BigDecimal a, BigDecimal b, String message) {
if (a.compareTo(b) > -1) { if (a == null || b == null || a.compareTo(b) > -1) {
throw new PlatException(message); throw new PlatException(message);
} }
} }
......
...@@ -9,68 +9,69 @@ $(function () { ...@@ -9,68 +9,69 @@ $(function () {
pageSize: 20, pageSize: 20,
pageSizes: [20, 50, 70, 100], pageSizes: [20, 50, 70, 100],
}, },
columns: [ columns: [{
{ field: "operator",
field: "operator", title: "操作",
title: "操作", template: function (item) {
width: 120, let template = '';
template: function (item) { if (!isBlank(item.id)) {
let template = ''; template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
if (!isBlank(item.id)){ + 'onclick="showDetail(' + item.id + ', ' + item.status + ',0, ' + item.source
+ ')" >详情</a>';
}
if (!isBlank(item.id)) {
//审核通过的,可以进行合同变更
if (item.status == 2) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ', ' + item.status + ',0, ' + item.source + ')" >详情</a>'; + 'onclick="showDetail(' + item.id + ', ' + item.status + ', 1, '
+ item.source + ')" >合同变更</a>';
} }
if (!isBlank(item.id)){ }
//审核通过的,可以进行合同变更 return template;
if(item.status == 2) }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' }, {
+ 'onclick="showDetail(' + item.id + ', ' + item.status + ', 1, ' + item.source + ')" >合同变更</a>'; field: "companyCode",
title: "公司编码",
template: function (dataItem) {
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['companyCode'] === dataItem['companyCode']) {
return companyCodeBox[i]['companyCode'];
} }
return template;
} }
}, { return dataItem["companyCode"];
field: "companyCode", }
title: "公司编码", }, {
template: function (dataItem) { field: "projCode",
for (let i = 0; i < companyCodeBox.length; i++) { title: "项目编码",
if (companyCodeBox[i]['companyCode'] === dataItem['companyCode']) { template: function (dataItem) {
return companyCodeBox[i]['companyCode']; for (let i = 0; i < projCodeBox.length; i++) {
} if (projCodeBox[i]['valueField'] === dataItem['projCode']) {
dataItem['projName'] = projCodeBox[i]['textField']
return projCodeBox[i]['valueField'];
} }
return dataItem["companyCode"];
} }
}, { return dataItem["projCode"] == null ? "" : dataItem["projCode"];
field: "projCode", },
title: "项目编码", editor: function (container, options) {
template: function (dataItem) { let inInfo = new EiInfo();
for (let i = 0; i < projCodeBox.length; i++) { inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
if (projCodeBox[i]['valueField'] === dataItem['projCode']) { inInfo.set("inqu_status-0-approvalStatus", 2);
dataItem['projName'] = projCodeBox[i]['textField'] inInfo.set("field", options.field);
return projCodeBox[i]['valueField']; EiCommunicator.send("HGSC003", "projComboBox", inInfo, {
} onSuccess: function (ei) {
projCodeBox = ei.getBlock("projRecordByRole_block_id").getMappedRows();
},
onFail: function (ei) {
} }
return dataItem["projCode"]; }, {async: false});
}, var input = $('<input />');
editor: function (container, options) { input.attr("name", options.field);
let inInfo = new EiInfo(); input.attr("id", options.field);
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]); input.appendTo(container);
inInfo.set("inqu_status-0-approvalStatus", 2); input.kendoDropDownList({
inInfo.set("field", options.field); dataSource: projCodeBox,
EiCommunicator.send("HGSC003", "projComboBox", inInfo, { minLength: 0,
onSuccess: function (ei) { dataTextField: "textField",
projCodeBox = ei.getBlock("projRecordByRole_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: projCodeBox,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField", dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#", optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#", valueTemplate: "[#:valueField#]#:textField#",
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="65vh"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="65vh">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="110" align="center"/>
<EF:EFComboColumn ename="source" cname="数据来源" enable="false" width="80" align="center" defaultValue="1"> <EF:EFComboColumn ename="source" cname="数据来源" enable="false" width="80" align="center" defaultValue="1">
<EF:EFCodeOption codeName="hggp.hpcg.receiveSource"/> <EF:EFCodeOption codeName="hggp.hpcg.receiveSource"/>
</EF:EFComboColumn> </EF:EFComboColumn>
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="companyName" cname="公司名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" width="100" align="center" required="true"/> <EF:EFColumn ename="projCode" cname="项目编码" width="140" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" editType="date" <EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
......
...@@ -38,6 +38,7 @@ $(function () { ...@@ -38,6 +38,7 @@ $(function () {
loadComplete: function (grid) { loadComplete: function (grid) {
// 确认 // 确认
$("#CONFIRM").on("click", confirm); $("#CONFIRM").on("click", confirm);
// change事件 // change事件
grid.dataSource.bind("change", function (e) { grid.dataSource.bind("change", function (e) {
supCodeChange(e); supCodeChange(e);
...@@ -59,8 +60,7 @@ $(function () { ...@@ -59,8 +60,7 @@ $(function () {
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
// 选择收货 $("#BTN_SUBMIT").on("click",batchUpdateSubmitStatus);
$("#SELECT_RECEIVE").on("click", selectReceive);
downKeyUp(); downKeyUp();
}); });
...@@ -229,3 +229,25 @@ function updateSubmitStatus(id) { ...@@ -229,3 +229,25 @@ function updateSubmitStatus(id) {
}); });
} }
/**
* 保存
*/
let batchUpdateSubmitStatus = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
if (rows[i]['submitStatus'] != 0) {
message("勾选的第" + (i + 1) + "行提交状态不是未提交");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC001", "updateSubmitStatus", true);
}
});
}
...@@ -9,6 +9,9 @@ $(function() { ...@@ -9,6 +9,9 @@ $(function() {
batchFlow(); batchFlow();
}); });
// 排产系数
$("#BATCH_COE").on("click", batchCoe);
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
...@@ -274,6 +277,22 @@ let deleteFunc = function () { ...@@ -274,6 +277,22 @@ let deleteFunc = function () {
}); });
} }
/**
* 排产系数
*
* @param id
* @param inventCode
* @param flowId
*/
function batchCoe() {
JSColorbox.open({
href: "HGPZ005D",
title: "<div style='text-align: center;'>排产系数</div>",
width: "80%",
height: "90%"
});
}
function showDetail(id) { function showDetail(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGPZ005A?methodName=initLoad&inqu_status-0-parentId=" + id, href: "HGPZ005A?methodName=initLoad&inqu_status-0-parentId=" + id,
......
$(function () {
IPLATUI.EFSelect = {
"inqu_status-0-processCode": {
change: function (e) {
query();
}
}
}
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [],
loadComplete: function (grid) {
},
}
}
// 查询
$("#QUERY").on("click", query);
// 保存
$("#SAVE").on("click", save);
// 按键
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
let processCode = $("#inqu_status-0-processCode").val();
if (!isBlank(processCode)) {
query();
}
});
/**
* 查询
*/
let query = function () {
let processCode = $("#inqu_status-0-processCode").val();
if (isBlank(processCode)) {
message("请选择工序");
return;
}
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let processCode = $("#inqu_status-0-processCode").val();
if (isBlank(processCode)) {
message("请选择工序");
return;
}
let composingCoeff = $("#inqu_status-0-composingCoeff").val();
if (isBlank(composingCoeff)) {
message("请填写排产系数");
return;
}
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ005D", "save",
false, function (res) {
message(res.msg);
}
);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ 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="存货类型" ename="inventType" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="存货编码" ename="inventCodeLike" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="规格" ename="spec" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="编辑区域">
<div class="row">
<EF:EFSelect cname="工序" ename="processCode" blockId="inqu_status" row="0" colWidth="6" ratio="2:10"
filter="contains" required="true">
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="排产系数" ename="composingCoeff" blockId="inqu_status" row="0" colWidth="6" ratio="2:10"
required="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" height="60vh">
<EF:EFColumn cname="排产系数" ename="composingCoeff" enable="false" width="100" align="center"/>
<EF:EFColumn cname="存货编码" ename="inventCode" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="120" align="center"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="140" align="center"/>
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="100" align="right" format="{0:N2}"/>
<EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N2}"/>
<EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N2}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="100" align="center"/>
<EF:EFColumn ename="coefficient" cname="系数" enable="false" width="80" align="right" format="{0:N2}"
defaultValue="1"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -254,7 +254,7 @@ $(function () { ...@@ -254,7 +254,7 @@ $(function () {
IPLAT.NotificationUtil(ei.getMsg(), "success") IPLAT.NotificationUtil(ei.getMsg(), "success")
$("#deleteOrgWindow").data("kendoWindow").close(); $("#deleteOrgWindow").data("kendoWindow").close();
const tree = $('#categoryTree').data('kendoTreeView'); const tree = $('#categoryTree').data('kendoTreeView');
const parentId = $("#inqu_status3-0-orgParentId").val(); const parentId = $("#inqu_status-0-orgParentId").val();
// 刷新树节点 // 刷新树节点
tree.reload(parentId); tree.reload(parentId);
// 展开树 // 展开树
...@@ -322,7 +322,6 @@ $(function () { ...@@ -322,7 +322,6 @@ $(function () {
callbackName: addCallback callbackName: addCallback
}); });
}*/ }*/
}) })
$("#categoryTree").mousedown(function (e) { $("#categoryTree").mousedown(function (e) {
...@@ -511,9 +510,9 @@ let query = function () { ...@@ -511,9 +510,9 @@ let query = function () {
/** /**
* 新增组织机构回调 * 新增组织机构回调
*/ */
let addCallback = function (parentOrgId) { let addCallback = function (parentId) {
// 回填父级ID // 回填父级ID
$("#inqu_status2-0-parentId").val(parentOrgId); $("#inqu_status-0-orgParentId").val(parentId);
refreshTree(); refreshTree();
} }
...@@ -522,7 +521,7 @@ let addCallback = function (parentOrgId) { ...@@ -522,7 +521,7 @@ let addCallback = function (parentOrgId) {
*/ */
let editCallback = function (parentOrgId) { let editCallback = function (parentOrgId) {
// 回填父级ID // 回填父级ID
$("#inqu_status2-0-parentId").val(parentOrgId); //$("#inqu_status-0-orgParentId").val(parentOrgId);
refreshTree(); refreshTree();
} }
...@@ -549,7 +548,7 @@ let refreshTree = function () { ...@@ -549,7 +548,7 @@ let refreshTree = function () {
} }
// 刷新树节点 // 刷新树节点
const tree = $("#categoryTree").data("kendoTreeView"); const tree = $("#categoryTree").data("kendoTreeView");
const treeOrgId = $("#inqu_status2-0-parentId").val() const treeOrgId = $("#inqu_status-0-orgParentId").val()
tree.reload(treeOrgId) tree.reload(treeOrgId)
expandTreeNode(tree, treeOrgId) expandTreeNode(tree, treeOrgId)
// tree.expandPath(treeOrgId) // tree.expandPath(treeOrgId)
...@@ -834,6 +833,11 @@ function uploadFile() { ...@@ -834,6 +833,11 @@ function uploadFile() {
}); });
} }
/**
* 文件变更
* @param docId 文件标识
* @param bizId 业务标识
*/
function changeFile(docId,bizId) { function changeFile(docId,bizId) {
JSColorbox.open({ JSColorbox.open({
href: "HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD" + href: "HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD" +
...@@ -944,7 +948,7 @@ let showAuthButton = function () { ...@@ -944,7 +948,7 @@ let showAuthButton = function () {
} }
/** /**
* 文件上传 * 变更记录
*/ */
function changeResord() { function changeResord() {
let leafType = IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel; let leafType = IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel;
......
...@@ -66,14 +66,14 @@ ...@@ -66,14 +66,14 @@
<EF:EFRegion id="result" title="附件详情" fitHeight="true"> <EF:EFRegion id="result" title="附件详情" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="no" personal="true" serviceName="HGWD099" queryMethod="query" deleteMethod="delete"> <EF:EFGrid blockId="result" autoDraw="no" personal="true" serviceName="HGWD099" queryMethod="query" deleteMethod="delete">
<EF:EFColumn ename="id" cname="ID" hidden="true"/> <EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/> <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="180"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/> <EF:EFColumn ename="docName" cname="文件名称" enable="false" width="180"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="120" align="center" defaultValue="0" hidden="false"> <EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center" defaultValue="0" hidden="false">
<EF:EFCodeOption codeName="hggp.hgwd.status"/> <EF:EFCodeOption codeName="hggp.hgwd.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="140" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</div> </div>
......
...@@ -181,8 +181,8 @@ let save = function (btnNode) { ...@@ -181,8 +181,8 @@ let save = function (btnNode) {
function (e) { function (e) {
var status = e.status; var status = e.status;
if (status !== -1) { if (status !== -1) {
let parentOrgId = $("#inqu_status-0-parentOrgId").val(); let parentId = $("#inqu_status-0-parentId").val();
parent.JSColorbox.setValueCallback(parentOrgId); parent.JSColorbox.setValueCallback(parentId);
} }
}); });
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
......
...@@ -149,8 +149,8 @@ let save = function (btnNode) { ...@@ -149,8 +149,8 @@ let save = function (btnNode) {
function (e) { function (e) {
var status = e.status; var status = e.status;
if (status !== -1) { if (status !== -1) {
let parentOrgId = $("#inqu_status-0-parentOrgId").val(); let fileId = $("#inqu_status-0-fileId").val();
parent.JSColorbox.setValueCallback(parentOrgId); parent.JSColorbox.setValueCallback(fileId);
} }
} }
); );
......
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