Commit 20741f2a by liuyang

2024-09-12

1.销售开票合同类型为销售项目合同可选择合同生成
2.销售开票未删除,结算单是不能删除
parent 89273d12
......@@ -234,7 +234,7 @@ public class ServiceHGCW002 extends ServiceBase {
public EiInfo contractComboBox(EiInfo inInfo){
Map<String,String> params = EiInfoUtils.getFirstRow(inInfo, EiConstant.queryBlock);
Map<String, Object> paramMap = new HashMap<>();
/*Map<String, Object> paramMap = new HashMap<>();
if (StringUtils.isNotEmpty(inInfo.getString(HGCW002.FIELD_REVIEW_STATUS))) {
paramMap.put(HGCW002.FIELD_REVIEW_STATUS, inInfo.getString(HGCW002.FIELD_REVIEW_STATUS));
}
......@@ -247,8 +247,9 @@ public class ServiceHGCW002 extends ServiceBase {
if (StringUtils.isNotEmpty(params.get(ACConstants.FIELD_TEXT))) {
paramMap.put(HGCW002.FIELD_CONTRACT_NAME, params.get(ACConstants.FIELD_TEXT));
}
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CONTRACT_BLOCK_ID), paramMap, false);
return inInfo;
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CONTRACT_BLOCK_ID), paramMap, false);*/
return super.query(inInfo,"HGCW002.queryComboBox",new HGCW002(),false,new HGCW002().eiMetadata,EiConstant.queryBlock, "contract_block_id", "contract_block_id");
}
......
......@@ -2,12 +2,11 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
......@@ -15,10 +14,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -163,11 +159,17 @@ public class ServiceHGCW008 extends ServiceBase {
*/
@OperationLogAnnotation(operModul = "租赁合同",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW008.delete", resultRows.get(i));
for (Map resultRow : resultRows) {
HGCW008 hgcw008 = new HGCW008();
hgcw008.fromMap(resultRow);
List<HGCW010> hgcw010List = DaoBase.getInstance().query(HGCW011.QUERY,
new HashMap<String, Object>(){{
put(HGCW010.FIELD_SETTLEMENT_NUMBER,hgcw008.getSettlementNumber());
}});
AssertUtils.isNotEmpty(hgcw010List, "结算单[" + hgcw008.getSettlementNumber() + "]已生成销售开票,不能删除!");
DaoUtils.update(HGCW008.DELETE, hgcw008);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
......@@ -493,7 +493,7 @@
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME LIKE CONCAT('%', #contractName#, '%')
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
ORDER BY CONTRACT_NUMBER desc
</select>
<select id="queryProjectComboBox" parameterClass="java.util.HashMap"
......
......@@ -176,7 +176,7 @@
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount"
FROM ${hggpSchema}.HGCW002 WHERE 1=1 AND CONTRACT_TYPE = 5 AND REMAINING_AMOUNT != 0 AND REVIEW_STATUS = '3'
FROM ${hggpSchema}.HGCW002 WHERE 1=1 AND CONTRACT_TYPE in (1,5) AND REMAINING_AMOUNT != 0 AND REVIEW_STATUS = '3'
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
......
......@@ -84,7 +84,7 @@
resultId="contract_block_id"
save="false" popupType="ServiceGrid"
valueField="result-0-mainContractNumber" textField="popupInputMainContractNumber"
columnEnames="valueField,textField"
columnEnames="contractNumber,contractName"
columnCnames="合同号,合同名称"
readonly="true"
resizable="true" popupTitle="主合同号" popupWidth="400">
......
......@@ -90,7 +90,7 @@
resultId="contract_block_id"
save="false" popupType="ServiceGrid"
valueField="result-0-mainContractNumber" textField="popupInputMainContractNumber"
columnEnames="valueField,textField"
columnEnames="contractNumber,contractName"
columnCnames="合同号,合同名称"
readonly="true"
resizable="true" popupTitle="主合同号" popupWidth="800">
......
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