Commit e2a8b13e by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents c114e9ca 5e8d1c85
...@@ -166,7 +166,7 @@ public class ServiceHGCG003 extends ServiceBase { ...@@ -166,7 +166,7 @@ public class ServiceHGCG003 extends ServiceBase {
} }
} }
} }
/** /**
* 数据修改,修改合同数据 * 数据修改,修改合同数据
* *
...@@ -184,7 +184,8 @@ public class ServiceHGCG003 extends ServiceBase { ...@@ -184,7 +184,8 @@ public class ServiceHGCG003 extends ServiceBase {
// 计算差异数量,更新合同状态 // 计算差异数量,更新合同状态
HGCG003 dbCg003 = dbCg003Map.get(receiveNo); HGCG003 dbCg003 = dbCg003Map.get(receiveNo);
BigDecimal diffQty = fCg003.getReceiveQty().subtract(dbCg003.getReceiveQty()); BigDecimal diffQty = fCg003.getReceiveQty().subtract(dbCg003.getReceiveQty());
HGCGTools.HgCg002.updateReceive(dbCg002AMap.get(contractNo), diffQty); BigDecimal diffWeight = fCg003.getReceiveWeight().subtract(dbCg003.getReceiveWeight());
HGCGTools.HgCg002.updateReceive(dbCg002AMap.get(contractNo), diffQty, diffWeight);
} }
} }
...@@ -248,7 +249,8 @@ public class ServiceHGCG003 extends ServiceBase { ...@@ -248,7 +249,8 @@ public class ServiceHGCG003 extends ServiceBase {
DaoUtils.update(HGCG003.DELETE, dbCg003); DaoUtils.update(HGCG003.DELETE, dbCg003);
if (fCg003.getSource().intValue() == HGConstant.CgSource.DEFAULT) { if (fCg003.getSource().intValue() == HGConstant.CgSource.DEFAULT) {
// 更新合同状态 // 更新合同状态
HGCGTools.HgCg002.updateReceive(dbCg002AMap.get(contractNo), dbCg003.getReceiveQty().negate()); HGCGTools.HgCg002.updateReceive(dbCg002AMap.get(contractNo), dbCg003.getReceiveQty().negate(),
dbCg003.getReceiveWeight().negate());
} }
} }
//子表修改 //子表修改
......
...@@ -126,6 +126,11 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -126,6 +126,11 @@ public class ServiceHGCG003A extends ServiceBase {
AssertUtils.isGt(fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty(), AssertUtils.isGt(fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty(),
String.format("合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)", cg001.getContractNo(), String.format("合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)", cg001.getContractNo(),
fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty())); fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty()));
// 计算方式未重量乘单价时,收货重量必须大于0
if (HgCgConst.CalculationMethod.S1.equals(fCg002B.getCalculationMethod())) {
AssertUtils.isGe(BigDecimal.ZERO, fCg002B.getBcReceiveWeight(),
String.format("合同【%s】计算方式为\"重量乘单价\",本次收货重量必须大于0", fCg002B.getContractNo()));
}
// AssertUtils.isGt(fCg002B.getBcReceiveWeight(), fCg002B.getBcMaxReceiveWeight(), // AssertUtils.isGt(fCg002B.getBcReceiveWeight(), fCg002B.getBcMaxReceiveWeight(),
// String.format("合同[%s]本次收货重量(%s)不能大于本次最大收货重量(%s)", cg001.getContractNo(), // String.format("合同[%s]本次收货重量(%s)不能大于本次最大收货重量(%s)", cg001.getContractNo(),
// fCg002B.getBcReceiveWeight(), fCg002B.getBcMaxReceiveWeight())); // fCg002B.getBcReceiveWeight(), fCg002B.getBcMaxReceiveWeight()));
...@@ -187,8 +192,7 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -187,8 +192,7 @@ public class ServiceHGCG003A extends ServiceBase {
HGCG003 newCg003 = insertMain(fCg002Bs, cg002); HGCG003 newCg003 = insertMain(fCg002Bs, cg002);
// 写入明细数据 // 写入明细数据
for (HGCG002B fCg002B : fCg002Bs) { for (HGCG002B fCg002B : fCg002Bs) {
Long id = fCg002B.getId(); insertDetails(fCg002B, dbCg002BMap, newCg003);
insertDetails(fCg002B, dbCg002BMap.get(id), newCg003);
} }
// 修改合同信息 // 修改合同信息
List<HGCG002> cg002s = new LinkedList<>(); List<HGCG002> cg002s = new LinkedList<>();
...@@ -234,10 +238,11 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -234,10 +238,11 @@ public class ServiceHGCG003A extends ServiceBase {
* 新增明细数据 * 新增明细数据
* *
* @param fCg002B * @param fCg002B
* @param dbCg002b * @param dbCg002BMap
* @param newCg003 * @param newCg003
*/ */
private void insertDetails(HGCG002B fCg002B, HGCG002B dbCg002b, HGCG003 newCg003) { private void insertDetails(HGCG002B fCg002B, Map<Long, HGCG002B> dbCg002BMap, HGCG003 newCg003) {
HGCG002B dbCg002b = dbCg002BMap.get(fCg002B.getId());
HGCG003B cg003B = BeanUtils.copy(dbCg002b, HGCG003B.class); HGCG003B cg003B = BeanUtils.copy(dbCg002b, HGCG003B.class);
cg003B.setReceiveDate(newCg003.getReceiveDate()); // 收货日期 cg003B.setReceiveDate(newCg003.getReceiveDate()); // 收货日期
cg003B.setReceiveNo(newCg003.getReceiveNo()); // 收货号 cg003B.setReceiveNo(newCg003.getReceiveNo()); // 收货号
...@@ -247,8 +252,12 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -247,8 +252,12 @@ public class ServiceHGCG003A extends ServiceBase {
cg003B.setReceiveUnitWeight(fCg002B.getPurUnitWeight()); cg003B.setReceiveUnitWeight(fCg002B.getPurUnitWeight());
cg003B.setReceiveQty(fCg002B.getBcReceiveQty()); cg003B.setReceiveQty(fCg002B.getBcReceiveQty());
cg003B.setReceiveWeight(fCg002B.getReceiveWeight()); cg003B.setReceiveWeight(fCg002B.getReceiveWeight());
cg003B.setAmount(fCg002B.getAmount());
cg003B.setTaxAmount(fCg002B.getTaxAmount());
cg003B.setTaxIncludeAmount(fCg002B.getTaxIncludeAmount());
cg003B.setContractDetailId(fCg002B.getId()); cg003B.setContractDetailId(fCg002B.getId());
cg003B.setUnCancelAmount(fCg002B.getTaxIncludeAmount()); cg003B.setUnCancelAmount(fCg002B.getTaxIncludeAmount());
cg003B.setCalculationMethod(fCg002B.getCalculationMethod());
cg003B.setStatus(HGConstant.CgReceiveStatus.S_0); cg003B.setStatus(HGConstant.CgReceiveStatus.S_0);
cg003B.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode()); cg003B.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGCG003B.INSERT, cg003B); DaoUtils.insert(HGCG003B.INSERT, cg003B);
......
...@@ -245,6 +245,7 @@ public class HGCGTools { ...@@ -245,6 +245,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33 * @date:2024/5/9,14:33
*/ */
public static class HgCg002 { public static class HgCg002 {
/** /**
* 查询 * 查询
* *
...@@ -294,11 +295,13 @@ public class HGCGTools { ...@@ -294,11 +295,13 @@ public class HGCGTools {
* *
* @param dbCg002 * @param dbCg002
* @param receiveQty * @param receiveQty
* @param receiveWeight
*/ */
public static void updateReceive(HGCG002 dbCg002, BigDecimal receiveQty) { public static void updateReceive(HGCG002 dbCg002, BigDecimal receiveQty, BigDecimal receiveWeight) {
AssertUtils.isNull(dbCg002, "合同号不能为空!"); AssertUtils.isNull(dbCg002, "合同号不能为空!");
AssertUtils.isNull(receiveQty, "收货数量不能为空!"); AssertUtils.isNull(receiveQty, "收货数量不能为空!");
BigDecimal newReceiveQty = receiveQty.add(dbCg002.getReceiveQty()); BigDecimal newReceiveQty = receiveQty.add(dbCg002.getReceiveQty());
BigDecimal newReceiveWeight = receiveWeight.add(dbCg002.getReceiveWeight());
BigDecimal diffQty = dbCg002.getPurQty().subtract(newReceiveQty); BigDecimal diffQty = dbCg002.getPurQty().subtract(newReceiveQty);
Integer status = diffQty.compareTo(BigDecimal.ZERO) == 0 ? HGConstant.CgContractStatus.S_5 Integer status = diffQty.compareTo(BigDecimal.ZERO) == 0 ? HGConstant.CgContractStatus.S_5
: HGConstant.CgContractStatus.S_4; : HGConstant.CgContractStatus.S_4;
...@@ -306,7 +309,7 @@ public class HGCGTools { ...@@ -306,7 +309,7 @@ public class HGCGTools {
paramMap.put(HGCG002.FIELD_CONTRACT_NO, dbCg002.getContractNo()); paramMap.put(HGCG002.FIELD_CONTRACT_NO, dbCg002.getContractNo());
paramMap.put(HGCG002.FIELD_STATUS, status); paramMap.put(HGCG002.FIELD_STATUS, status);
paramMap.put(HGCG002.FIELD_RECEIVE_QTY, newReceiveQty); paramMap.put(HGCG002.FIELD_RECEIVE_QTY, newReceiveQty);
paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveQty.multiply(dbCg002.getPurUnitWeight())); paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveWeight);
DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_RECEIVE, paramMap); DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_RECEIVE, paramMap);
} }
...@@ -597,7 +600,7 @@ public class HGCGTools { ...@@ -597,7 +600,7 @@ public class HGCGTools {
paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveWeight); paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveWeight);
if (newReceiveQty.compareTo(BigDecimal.ZERO) == 0) { if (newReceiveQty.compareTo(BigDecimal.ZERO) == 0) {
paramMap.put(HGCG002.FIELD_STATUS, HGConstant.CgContractStatus.S_2); paramMap.put(HGCG002.FIELD_STATUS, HGConstant.CgContractStatus.S_2);
} else if (dbCg002B.getPurQty().compareTo(newReceiveQty) == 0) { } else if (newReceiveQty.compareTo(dbCg002B.getPurQty()) >= 0) {
paramMap.put(HGCG002.FIELD_STATUS, HGConstant.CgContractStatus.S_5); paramMap.put(HGCG002.FIELD_STATUS, HGConstant.CgContractStatus.S_5);
} else { } else {
paramMap.put(HGCG002.FIELD_STATUS, HGConstant.CgContractStatus.S_4); paramMap.put(HGCG002.FIELD_STATUS, HGConstant.CgContractStatus.S_4);
......
...@@ -132,6 +132,8 @@ public class HGConstant { ...@@ -132,6 +132,8 @@ public class HGConstant {
public static final String RETURN_CODE = "RETURN_CODE"; public static final String RETURN_CODE = "RETURN_CODE";
public static final String WD_FILE_ID = "WD_FILE_ID"; public static final String WD_FILE_ID = "WD_FILE_ID";
// 回访单号
public static final String FOL_NO = "FOL_NO";
} }
......
...@@ -36,6 +36,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -36,6 +36,7 @@ public class HGDM099 extends DaoEPBase {
public static final String FIELD_BIZ_ID = "bizId"; /* 业务ID*/ public static final String FIELD_BIZ_ID = "bizId"; /* 业务ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/ public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/ public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/
public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/ public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/
public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/ public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/
...@@ -53,6 +54,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -53,6 +54,7 @@ public class HGDM099 extends DaoEPBase {
public static final String COL_BIZ_ID = "BIZ_ID"; /* 业务ID*/ public static final String COL_BIZ_ID = "BIZ_ID"; /* 业务ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/ public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件名称*/ public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件名称*/
public static final String COL_DOC_TYPE = "DOC_TYPE"; /* 文件类型*/
public static final String COL_PREVIEW_NUM = "PREVIEW_NUM"; /* 预览次数*/ public static final String COL_PREVIEW_NUM = "PREVIEW_NUM"; /* 预览次数*/
public static final String COL_DOWNLOAD_NUM = "DOWNLOAD_NUM"; /* 下载次数*/ public static final String COL_DOWNLOAD_NUM = "DOWNLOAD_NUM"; /* 下载次数*/
...@@ -76,6 +78,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -76,6 +78,7 @@ public class HGDM099 extends DaoEPBase {
private String bizId = " "; /* 业务ID*/ private String bizId = " "; /* 业务ID*/
private String docId = " "; /* 文件ID*/ private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/ private String docName = " "; /* 文件名称*/
private String docType = " "; /* 文件类型*/
private Integer previewNum = new Integer(0); /* 预览次数*/ private Integer previewNum = new Integer(0); /* 预览次数*/
private Integer downloadNum = new Integer(0); /* 下载次数*/ private Integer downloadNum = new Integer(0); /* 下载次数*/
...@@ -141,7 +144,11 @@ public class HGDM099 extends DaoEPBase { ...@@ -141,7 +144,11 @@ public class HGDM099 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DOC_NAME); eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称"); eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_TYPE);
eiColumn.setDescName("文件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PREVIEW_NUM); eiColumn = new EiColumn(FIELD_PREVIEW_NUM);
eiColumn.setDescName("预览次数"); eiColumn.setDescName("预览次数");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -383,7 +390,15 @@ public class HGDM099 extends DaoEPBase { ...@@ -383,7 +390,15 @@ public class HGDM099 extends DaoEPBase {
public void setDocName(String docName) { public void setDocName(String docName) {
this.docName = docName; this.docName = docName;
} }
public String getDocType() {
return docType;
}
public void setDocType(String docType) {
this.docType = docType;
}
/** /**
* get the previewNum - 预览次数. * get the previewNum - 预览次数.
* @return the previewNum * @return the previewNum
...@@ -438,6 +453,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -438,6 +453,7 @@ public class HGDM099 extends DaoEPBase {
setBizId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_ID)), bizId)); setBizId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_ID)), bizId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId)); setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName)); setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType));
setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum)); setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum));
setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum)); setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum));
} }
...@@ -463,6 +479,7 @@ public class HGDM099 extends DaoEPBase { ...@@ -463,6 +479,7 @@ public class HGDM099 extends DaoEPBase {
map.put(FIELD_BIZ_ID, StringUtils.toString(bizId, eiMetadata.getMeta(FIELD_BIZ_ID))); map.put(FIELD_BIZ_ID, StringUtils.toString(bizId, eiMetadata.getMeta(FIELD_BIZ_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID))); map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME))); map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE)));
map.put(FIELD_PREVIEW_NUM, StringUtils.toString(previewNum, eiMetadata.getMeta(FIELD_PREVIEW_NUM))); map.put(FIELD_PREVIEW_NUM, StringUtils.toString(previewNum, eiMetadata.getMeta(FIELD_PREVIEW_NUM)));
map.put(FIELD_DOWNLOAD_NUM, StringUtils.toString(downloadNum, eiMetadata.getMeta(FIELD_DOWNLOAD_NUM))); map.put(FIELD_DOWNLOAD_NUM, StringUtils.toString(downloadNum, eiMetadata.getMeta(FIELD_DOWNLOAD_NUM)));
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
BIZ_ID as "bizId", <!-- 业务ID --> BIZ_ID as "bizId", <!-- 业务ID -->
DOC_ID as "docId", <!-- 文件ID --> DOC_ID as "docId", <!-- 文件ID -->
DOC_NAME as "docName", <!-- 文件名称 --> DOC_NAME as "docName", <!-- 文件名称 -->
DOC_TYPE as "docType", <!-- 文件类型 -->
PREVIEW_NUM as "previewNum", <!-- 预览次数 --> PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
DOWNLOAD_NUM as "downloadNum" <!-- 下载次数 --> DOWNLOAD_NUM as "downloadNum" <!-- 下载次数 -->
</sql> </sql>
...@@ -88,22 +89,26 @@ ...@@ -88,22 +89,26 @@
BIZ_TYPE, <!-- 业务类型 --> BIZ_TYPE, <!-- 业务类型 -->
BIZ_ID, <!-- 业务ID --> BIZ_ID, <!-- 业务ID -->
DOC_ID, <!-- 文件ID --> DOC_ID, <!-- 文件ID -->
DOC_NAME <!-- 文件名称 --> DOC_NAME, <!-- 文件名称 -->
DOC_TYPE <!-- 文件类型 -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName# #deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#
) )
</insert> </insert>
<delete id="deleteBizId"> <delete id="deleteBizId">
UPDATE ${hggpSchema}.HGDM099 UPDATE ${hggpSchema}.HGDM099
SET DELETE_FLAG = 1 SET DELETE_FLAG = 1
<include refid="SqlBase.updateRevise"/>
WHERE BIZ_ID = #bizId# WHERE BIZ_ID = #bizId#
AND BIZ_TYPE = #bizType#
</delete> </delete>
<delete id="delete"> <delete id="delete">
UPDATE ${hggpSchema}.HGDM099 UPDATE ${hggpSchema}.HGDM099
SET DELETE_FLAG = 1 SET DELETE_FLAG = 1,
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</delete> </delete>
...@@ -111,20 +116,15 @@ ...@@ -111,20 +116,15 @@
UPDATE ${hggpSchema}.HGDM099 UPDATE ${hggpSchema}.HGDM099
SET SET
DOC_ID = #docId#, <!-- 文件ID --> DOC_ID = #docId#, <!-- 文件ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 --> <include refid="SqlBase.updateRevise"/>
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<update id="batchUpdate"> <update id="batchUpdate">
UPDATE ${hggpSchema}.HGDM099 UPDATE ${hggpSchema}.HGDM099
SET SET
BIZ_ID = #bizId#, <!-- 物料ID --> BIZ_ID = #bizId#, <!-- 物料ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 --> <include refid="SqlBase.updateRevise"/>
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate> WHERE DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate>
</update> </update>
......
...@@ -35,6 +35,7 @@ public class HGXS007 extends DaoEPBase { ...@@ -35,6 +35,7 @@ public class HGXS007 extends DaoEPBase {
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除 0-否1-是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除 0-否1-是*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/ public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_FOL_NO = "folNo"; /* 回访单号*/
public static final String FIELD_FOL_DATE = "folDate"; /* 回访日期*/ public static final String FIELD_FOL_DATE = "folDate"; /* 回访日期*/
public static final String FIELD_FOL_TYPE = "folType"; /* 回访方式 1-电话回访 2-上门回访*/ public static final String FIELD_FOL_TYPE = "folType"; /* 回访方式 1-电话回访 2-上门回访*/
public static final String FIELD_FOL_STATUS = "folStatus"; /* 回访状态 0-待回访 1-已回访*/ public static final String FIELD_FOL_STATUS = "folStatus"; /* 回访状态 0-待回访 1-已回访*/
...@@ -51,6 +52,7 @@ public class HGXS007 extends DaoEPBase { ...@@ -51,6 +52,7 @@ public class HGXS007 extends DaoEPBase {
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除 0-否1-是*/ public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除 0-否1-是*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/ public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_FOL_NO = "FOL_NO"; /* 回访单号*/
public static final String COL_FOL_DATE = "FOL_DATE"; /* 回访日期*/ public static final String COL_FOL_DATE = "FOL_DATE"; /* 回访日期*/
public static final String COL_FOL_TYPE = "FOL_TYPE"; /* 回访方式 1-电话回访 2-上门回访*/ public static final String COL_FOL_TYPE = "FOL_TYPE"; /* 回访方式 1-电话回访 2-上门回访*/
public static final String COL_FOL_STATUS = "FOL_STATUS"; /* 回访状态 0-待回访 1-已回访*/ public static final String COL_FOL_STATUS = "FOL_STATUS"; /* 回访状态 0-待回访 1-已回访*/
...@@ -73,6 +75,7 @@ public class HGXS007 extends DaoEPBase { ...@@ -73,6 +75,7 @@ public class HGXS007 extends DaoEPBase {
private Integer deleteFlag; /* 是否删除 0-否1-是*/ private Integer deleteFlag; /* 是否删除 0-否1-是*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/ private String companyName = " "; /* 公司名称*/
private String folNo = " "; /* 回访单号*/
private String folDate = " "; /* 回访日期*/ private String folDate = " "; /* 回访日期*/
private Integer folType; /* 回访方式 1-电话回访 2-上门回访*/ private Integer folType; /* 回访方式 1-电话回访 2-上门回访*/
private Integer folStatus; /* 回访状态 0-待回访 1-已回访*/ private Integer folStatus; /* 回访状态 0-待回访 1-已回访*/
...@@ -139,6 +142,10 @@ public class HGXS007 extends DaoEPBase { ...@@ -139,6 +142,10 @@ public class HGXS007 extends DaoEPBase {
eiColumn.setDescName("公司名称"); eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FOL_NO);
eiColumn.setDescName("回访单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FOL_DATE); eiColumn = new EiColumn(FIELD_FOL_DATE);
eiColumn.setDescName("回访日期"); eiColumn.setDescName("回访日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -370,6 +377,14 @@ public class HGXS007 extends DaoEPBase { ...@@ -370,6 +377,14 @@ public class HGXS007 extends DaoEPBase {
this.companyName = companyName; this.companyName = companyName;
} }
public String getFolNo() {
return folNo;
}
public void setFolNo(String folNo) {
this.folNo = folNo;
}
/** /**
* get the folDate - 回访日期. * get the folDate - 回访日期.
* *
...@@ -444,6 +459,7 @@ public class HGXS007 extends DaoEPBase { ...@@ -444,6 +459,7 @@ public class HGXS007 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName)); setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setFolNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FOL_NO)), folNo));
setFolDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FOL_DATE)), folDate)); setFolDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FOL_DATE)), folDate));
setFolType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_FOL_TYPE)), folType)); setFolType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_FOL_TYPE)), folType));
setFolStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_FOL_STATUS)), folStatus)); setFolStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_FOL_STATUS)), folStatus));
...@@ -468,6 +484,7 @@ public class HGXS007 extends DaoEPBase { ...@@ -468,6 +484,7 @@ public class HGXS007 extends DaoEPBase {
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME))); map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_FOL_NO, StringUtils.toString(folNo, eiMetadata.getMeta(FIELD_FOL_NO)));
map.put(FIELD_FOL_DATE, StringUtils.toString(folDate, eiMetadata.getMeta(FIELD_FOL_DATE))); map.put(FIELD_FOL_DATE, StringUtils.toString(folDate, eiMetadata.getMeta(FIELD_FOL_DATE)));
map.put(FIELD_FOL_TYPE, StringUtils.toString(folType, eiMetadata.getMeta(FIELD_FOL_TYPE))); map.put(FIELD_FOL_TYPE, StringUtils.toString(folType, eiMetadata.getMeta(FIELD_FOL_TYPE)));
map.put(FIELD_FOL_STATUS, StringUtils.toString(folStatus, eiMetadata.getMeta(FIELD_FOL_STATUS))); map.put(FIELD_FOL_STATUS, StringUtils.toString(folStatus, eiMetadata.getMeta(FIELD_FOL_STATUS)));
......
...@@ -64,7 +64,7 @@ public class ServiceHGXS007B extends ServiceEPBase { ...@@ -64,7 +64,7 @@ public class ServiceHGXS007B extends ServiceEPBase {
try { try {
HGXS007 fXs007 = MapUtils.toDaoEPBase(inInfo, HGXS007.class); HGXS007 fXs007 = MapUtils.toDaoEPBase(inInfo, HGXS007.class);
fXs007.setFolDate(DateUtils.formatShort(fXs007.getFolDate())); fXs007.setFolDate(DateUtils.formatShort(fXs007.getFolDate()));
if (fXs007.getId() == null || fXs007.getId() == 0) { if (StringUtils.isBlank(fXs007.getFolNo())) {
this.add(fXs007); this.add(fXs007);
} else { } else {
this.modify(fXs007); this.modify(fXs007);
...@@ -84,6 +84,7 @@ public class ServiceHGXS007B extends ServiceEPBase { ...@@ -84,6 +84,7 @@ public class ServiceHGXS007B extends ServiceEPBase {
* @param fXs007 * @param fXs007
*/ */
private void add(HGXS007 fXs007) { private void add(HGXS007 fXs007) {
fXs007.setFolNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.FOL_NO));
fXs007.setFolStatus(HgXsConstant.FolStatus.S0); fXs007.setFolStatus(HgXsConstant.FolStatus.S0);
DaoUtils.insert(HGXS007.INSERT, fXs007); DaoUtils.insert(HGXS007.INSERT, fXs007);
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 --> COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 --> COMPANY_NAME as "companyName", <!-- 公司名称 -->
FOL_NO as "folNo", <!-- 回访单号 -->
FOL_DATE as "folDate", <!-- 回访日期 --> FOL_DATE as "folDate", <!-- 回访日期 -->
FOL_TYPE as "folType", <!-- 回访方式 1-电话回访 2-上门回访 --> FOL_TYPE as "folType", <!-- 回访方式 1-电话回访 2-上门回访 -->
FOL_STATUS as "folStatus" <!-- 回访状态 0-待回访 1-已回访 --> FOL_STATUS as "folStatus" <!-- 回访状态 0-待回访 1-已回访 -->
...@@ -66,6 +67,12 @@ ...@@ -66,6 +67,12 @@
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate> ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="folNo">
FOL_NO = #folNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="folNos">
FOL_NO IN <iterate open="(" close=")" conjunction="," property="folNos">#folNos[]#</iterate>
</isNotEmpty>
</sql> </sql>
<sql id="orderBy"> <sql id="orderBy">
...@@ -103,12 +110,13 @@ ...@@ -103,12 +110,13 @@
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 --> COMPANY_NAME, <!-- 公司名称 -->
FOL_NO, <!-- 回访单号-->
FOL_DATE, <!-- 回访日期 --> FOL_DATE, <!-- 回访日期 -->
FOL_TYPE, <!-- 回访方式 1-电话回访 2-上门回访 --> FOL_TYPE, <!-- 回访方式 1-电话回访 2-上门回访 -->
FOL_STATUS <!-- 回访状态 0-待回访 1-已回访 --> FOL_STATUS <!-- 回访状态 0-待回访 1-已回访 -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #folDate#, #folType#, #folStatus# #companyCode#, #companyName#, #folNo#, #folDate#, #folType#, #folStatus#
) )
</insert> </insert>
......
...@@ -35,8 +35,6 @@ import java.util.Map; ...@@ -35,8 +35,6 @@ import java.util.Map;
*/ */
public class ServiceXS3002 extends ServiceEPBase { public class ServiceXS3002 extends ServiceEPBase {
private static final Logger logger = LoggerFactory.getLogger(ServiceXS3002.class);
private String USER_TYPE = "USER"; private String USER_TYPE = "USER";
public ServiceXS3002() { public ServiceXS3002() {
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/> <EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="calculationMethod" cname="计算方式" enable="true" width="100" align="center"> <EF:EFComboColumn ename="calculationMethod" cname="计算方式" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hggp.cg.calculationMethod"/> <EF:EFCodeOption codeName="hggp.cg.calculationMethod"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" enable="false"/> <EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" enable="false"/>
......
...@@ -8,6 +8,12 @@ $(function () { ...@@ -8,6 +8,12 @@ $(function () {
return; return;
} }
NotificationUtil("附件上传成功"); NotificationUtil("附件上传成功");
// 设置文件类型
let docName = e.response.docName;
let index = docName.lastIndexOf(".");
if (index > -1) {
e.response.docType = docName.substring(index + 1);
}
try { try {
parent.JSColorbox.setValueCallback(e); parent.JSColorbox.setValueCallback(e);
} catch (e) { } catch (e) {
......
...@@ -27,8 +27,9 @@ ...@@ -27,8 +27,9 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="id" cname="回访单ID" enable="false" width="80" align="center"/> <EF:EFColumn ename="folNo" cname="回访单号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="folDate" cname="回访日期" enable="false" width="100" align="center" editType="date" <EF:EFColumn ename="folDate" cname="回访日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/> <EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
......
...@@ -108,6 +108,7 @@ function uploadFileCallback(e) { ...@@ -108,6 +108,7 @@ function uploadFileCallback(e) {
inInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val()); inInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
inInfo.set("result-0-docId", e.response.docId); inInfo.set("result-0-docId", e.response.docId);
inInfo.set("result-0-docName", e.response.docName); inInfo.set("result-0-docName", e.response.docName);
inInfo.set("result-0-docType", e.response.docType);
EiCommunicator.send('HGDM099', 'upload', inInfo, { EiCommunicator.send('HGDM099', 'upload', inInfo, {
onSuccess(res) { onSuccess(res) {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
<EF:EFPage title="回访单详情"> <EF:EFPage title="回访单详情">
<EF:EFRegion id="result" title="数据区域"> <EF:EFRegion id="result" title="数据区域">
<EF:EFInput cname="ID" blockId="result" ename="id" row="0" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFInput cname="ID" blockId="result" ename="id" row="0" colWidth="6" ratio="2:10" required="true" <EF:EFInput cname="回访单号" blockId="result" ename="folNo" row="0" colWidth="6" ratio="2:10" required="true"
readonly="true"/> readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
...@@ -31,7 +32,7 @@ ...@@ -31,7 +32,7 @@
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<br/> <br/>
<span style="color: red; ">说明:ID由系统自动生成</span><br> <span style="color: red; ">说明:回访单号由系统自动生成</span><br>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -234,27 +234,21 @@ let deptCodeChange = function (e) { ...@@ -234,27 +234,21 @@ let deptCodeChange = function (e) {
let deptCodeRows = __eiInfo.blocks.dept_code_block_id.rows; let deptCodeRows = __eiInfo.blocks.dept_code_block_id.rows;
for (let k = 0; k < resultGrid.getCheckedRowsIndex() + 1; k++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex() + 1; k++) {
for (let i = 0; i < deptCodeRows.length; i++) { for (let i = 0; i < deptCodeRows.length; i++) {
if (deptCodeRows[i][1] === item.depCode) { let deptCodeRow = deptCodeRows[i];
let depName = deptCodeRows[i][0]; if (deptCodeRow[1] === item.depCode) {
resultGrid.setCellValue(item, 'depName', depName == null ? "" : depName); resultGrid.setCellValue(item, 'depName', deptCodeRow[0] == null ? "" : deptCodeRow[0]);
let factoryCode = deptCodeRows[i][2]; resultGrid.setCellValue(item, 'factoryCode', deptCodeRow[2] == null ? "" : deptCodeRow[2]);
let factoryName = deptCodeRows[i][3]; resultGrid.setCellValue(item, 'factoryName', deptCodeRow[3] == null ? "" : deptCodeRow[3]);
resultGrid.setCellValue(item, 'factoryCode', factoryCode == null ? "" : factoryCode); resultGrid.setCellValue(item, 'companyCode', deptCodeRow[4] == null ? "" : deptCodeRow[4]);
resultGrid.setCellValue(item, 'factoryName', factoryName == null ? "" : factoryName); resultGrid.setCellValue(item, 'companyName', deptCodeRow[5] == null ? "" : deptCodeRow[5]);
let companyCode = deptCodeRows[i][4] break;
let companyName = deptCodeRows[i][5]
resultGrid.setCellValue(item, 'companyCode', companyCode == null ? "" : companyCode);
resultGrid.setCellValue(item, 'companyName', companyName == null ? "" : companyName);
return;
} }
} }
} }
} }
function refreshQuery() { function refreshQuery() {
if(resultGrid.dataSource) { // resultGrid.dataSource.page(1);
resultGrid.dataSource.page(1);
}
} }
const flashUser = (userGroup) => { const flashUser = (userGroup) => {
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
<EF:EFOptions blockId="dept_code_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="dept_code_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="depName" cname="所属部门名称" enable="false" width="110" align="left"/> <EF:EFColumn ename="depName" cname="所属部门名称" enable="false" width="110" align="left"/>
<EF:EFColumn ename="factoryCode" cname="所属厂区编码" enable="false" width="110" align="center"/>
<EF:EFColumn ename="factoryName" cname="所属厂区名称" enable="false" width="110" align="left"/> <EF:EFColumn ename="factoryName" cname="所属厂区名称" enable="false" width="110" align="left"/>
<EF:EFColumn ename="factoryCode" cname="所属厂区编码" enable="false" width="110" align="left"/> <EF:EFColumn ename="companyCode" cname="所属公司编码" enable="false" width="110" align="center"/>
<EF:EFColumn ename="companyName" cname="所属公司名称" enable="false" width="110" align="left"/> <EF:EFColumn ename="companyName" cname="所属公司名称" enable="false" width="180" align="left"/>
<EF:EFColumn ename="companyCode" cname="所属公司编码" enable="false" width="110" align="left"/>
<EF:EFColumn ename="manageGroupEname" cname="管辖组英文名" style="text-align:left;" hidden="true"/> <EF:EFColumn ename="manageGroupEname" cname="管辖组英文名" style="text-align:left;" hidden="true"/>
<EF:EFColumn ename="manageGroupCname" cname="管辖组中文名" style="text-align:left;" readonly="true" <EF:EFColumn ename="manageGroupCname" cname="管辖组中文名" style="text-align:left;" readonly="true"
hidden="true"/> hidden="true"/>
......
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