Commit d1321201 by 宋祥

1.fixBug:解决公共方法中下拉框组装值错误的问题

parent fedb0d16
package com.baosight.hggp.hg.sc.service; package com.baosight.hggp.hg.sc.service;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ProductTypeEnum; import com.baosight.hggp.common.ProductTypeEnum;
...@@ -10,9 +9,18 @@ import com.baosight.hggp.core.security.UserSessionUtils; ...@@ -10,9 +9,18 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.*; import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -24,9 +32,17 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -24,9 +32,17 @@ import com.baosight.iplat4j.core.util.StringUtils;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import cn.hutool.core.bean.BeanUtil;
/** /**
* @Author jhs * @Author jhs
...@@ -384,7 +400,7 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -384,7 +400,7 @@ public class ServiceHGSC004A extends ServiceBase {
mapA.put("notId",hgsc004a.getId()); mapA.put("notId",hgsc004a.getId());
} }
List<HGSC004A> hgsc004AList = dao.query(HGSC004A.QUERY,mapA, 0, -999999); List<HGSC004A> hgsc004AList = dao.query(HGSC004A.QUERY,mapA, 0, -999999);
AssertUtils.isTrue(!CollectionUtils.isEmpty(hgsc004AList), "已存在构"+hgsc004a.getProductCode()+"-"+hgsc004a.getProductName()); AssertUtils.isTrue(!CollectionUtils.isEmpty(hgsc004AList), "已存在构"+hgsc004a.getProductCode()+"-"+hgsc004a.getProductName());
} }
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
......
...@@ -592,7 +592,7 @@ public class HGSCTools { ...@@ -592,7 +592,7 @@ public class HGSCTools {
mapA.put(HGSC004A.FIELD_parent_prod_code,hgsc004a.getParentProdCode()); mapA.put(HGSC004A.FIELD_parent_prod_code,hgsc004a.getParentProdCode());
mapA.put(HGSC004A.FIELD_product_code,hgsc004a.getProductCode()); mapA.put(HGSC004A.FIELD_product_code,hgsc004a.getProductCode());
List<HGSC004A> hgsc004AList = list(mapA); List<HGSC004A> hgsc004AList = list(mapA);
AssertUtils.isTrue(!CollectionUtils.isEmpty(hgsc004AList), String.format("已存在构%s-%s",hgsc004a.getProductCode(),hgsc004a.getProductName())); AssertUtils.isTrue(!CollectionUtils.isEmpty(hgsc004AList), String.format("已存在构%s-%s",hgsc004a.getProductCode(),hgsc004a.getProductName()));
} }
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!"); AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
//AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!"); //AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
......
...@@ -93,16 +93,16 @@ public class CommonMethod { ...@@ -93,16 +93,16 @@ public class CommonMethod {
row.put(HGConstants.VALUE_FIELD, String.valueOf(tryValue.get(tableParam.getValue()))); row.put(HGConstants.VALUE_FIELD, String.valueOf(tryValue.get(tableParam.getValue())));
if(isSplicingSymbol) { if(isSplicingSymbol) {
row.put(HGConstants.TEXT_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getText()))); row.put(HGConstants.TEXT_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getText())));
row.put(HGConstants.PARAM1_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam1()))); row.put(HGConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1())));
row.put(HGConstants.PARAM2_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam2()))); row.put(HGConstants.PARAM2_FIELD, String.valueOf(tryValue.get(tableParam.getParam2())));
row.put(HGConstants.PARAM3_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam3()))); row.put(HGConstants.PARAM3_FIELD, String.valueOf(tryValue.get(tableParam.getParam3())));
row.put(HGConstants.PARAM4_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam4()))); row.put(HGConstants.PARAM4_FIELD, String.valueOf(tryValue.get(tableParam.getParam4())));
row.put(HGConstants.PARAM5_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam5()))); row.put(HGConstants.PARAM5_FIELD, String.valueOf(tryValue.get(tableParam.getParam5())));
row.put(HGConstants.PARAM6_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam6()))); row.put(HGConstants.PARAM6_FIELD, String.valueOf(tryValue.get(tableParam.getParam6())));
row.put(HGConstants.PARAM7_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam7()))); row.put(HGConstants.PARAM7_FIELD, String.valueOf(tryValue.get(tableParam.getParam7())));
row.put(HGConstants.PARAM8_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam8()))); row.put(HGConstants.PARAM8_FIELD, String.valueOf(tryValue.get(tableParam.getParam8())));
row.put(HGConstants.PARAM9_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam9()))); row.put(HGConstants.PARAM9_FIELD, String.valueOf(tryValue.get(tableParam.getParam9())));
row.put(HGConstants.PARAM10_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam10()))); row.put(HGConstants.PARAM10_FIELD, String.valueOf(tryValue.get(tableParam.getParam10())));
} else { } else {
row.put(HGConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText()))); row.put(HGConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText())));
row.put(HGConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1()))); row.put(HGConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1())));
......
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