1、认领优化

This commit is contained in:
zhengyf 2025-09-10 14:36:19 +08:00
parent 1cd26a247a
commit 9e0bb28da0
11 changed files with 184 additions and 54 deletions

View File

@ -45,6 +45,11 @@ public class FeClaimBillBEntity extends BaseEntity {
*/
private String explain;
private String bssm;
/**
* 外币服务费
*/
private String wbfwf;
/**
* 汇率
*/

View File

@ -13,6 +13,7 @@
<result property="currencyName" column="currency_name" jdbcType="VARCHAR"/>
<result property="money" column="money" jdbcType="VARCHAR"/>
<result property="bssm" column="bssm" jdbcType="VARCHAR"/>
<result property="wbfwf" column="wbfwf" jdbcType="VARCHAR"/>
<result property="rate" column="rate" jdbcType="VARCHAR"/>
<result property="wldx" column="wldx" jdbcType="VARCHAR"/>
<result property="businessType" column="business_type" jdbcType="VARCHAR"/>
@ -47,6 +48,7 @@
,currency_name
,money
,bssm
,wbfwf
,rate
,wldx
,business_type
@ -86,6 +88,7 @@
<if test="currencyName != null and currencyName != ''">and currency_name = #{currencyName}</if>
<if test="money != null and money != ''">and money = #{money}</if>
<if test="bssm != null and bssm != ''">and bssm = #{bssm}</if>
<if test="wbfwf != null and wbfwf != ''">and wbfwf = #{wbfwf}</if>
<if test="rate != null and rate != ''">and rate = #{rate}</if>
<if test="wldx != null and wldx != ''">and wldx = #{wldx}</if>
<if test="businessType != null and businessType != ''">and business_type = #{businessType}</if>
@ -128,6 +131,7 @@
<if test="currencyName != null and currencyName != ''">and currency_name = #{currencyName}</if>
<if test="money != null and money != ''">and money = #{money}</if>
<if test="bssm != null and bssm != ''">and bssm = #{bssm}</if>
<if test="wbfwf != null and wbfwf != ''">and wbfwf = #{wbfwf}</if>
<if test="rate != null and rate != ''">and rate = #{rate}</if>
<if test="wldx != null and wldx != ''">and wldx = #{wldx}</if>
<if test="businessType != null and businessType != ''">and business_type = #{businessType}</if>
@ -176,6 +180,7 @@
</if>
<if test="money != null and money != ''">and money like concat('%',#{money},'%')</if>
<if test="bssm != null and bssm != ''">and bssm like concat('%',#{bssm},'%')</if>
<if test="wbfwf != null and wbfwf != ''">and wbfwf like concat('%',#{wbfwf},'%')</if>
<if test="rate != null and rate != ''">and rate like concat('%',#{rate},'%')</if>
<if test="wldx != null and wldx != ''">and wldx like concat('%',#{wldx},'%')</if>
<if test="businessType != null and businessType != ''">and business_type like
@ -222,6 +227,7 @@
<if test="currencyName != null and currencyName != ''">or currency_name = #{currencyName}</if>
<if test="money != null and money != ''">or money = #{money}</if>
<if test="bssm != null and bssm != ''">or bssm = #{bssm}</if>
<if test="wbfwf != null and wbfwf != ''">or wbfwf = #{wbfwf}</if>
<if test="rate != null and rate != ''">or rate = #{rate}</if>
<if test="wldx != null and wldx != ''">or wldx = #{wldx}</if>
<if test="businessType != null and businessType != ''">or business_type = #{businessType}</if>
@ -264,6 +270,7 @@
<if test="currencyName != null and currencyName != ''">currency_name ,</if>
<if test="money != null and money != ''">money ,</if>
<if test="bssm != null and bssm != ''">bssm ,</if>
<if test="wbfwf != null and wbfwf != ''">wbfwf ,</if>
<if test="rate != null and rate != ''">rate ,</if>
<if test="wldx != null and wldx != ''">wldx ,</if>
<if test="businessType != null and businessType != ''">business_type ,</if>
@ -301,6 +308,7 @@
<if test="currencyName != null and currencyName != ''">#{currencyName} ,</if>
<if test="money != null and money != ''">#{money} ,</if>
<if test="bssm != null and bssm != ''">#{bssm} ,</if>
<if test="wbfwf != null and wbfwf != ''">#{wbfwf} ,</if>
<if test="rate != null and rate != ''">#{rate} ,</if>
<if test="wldx != null and wldx != ''">#{wldx} ,</if>
<if test="businessType != null and businessType != ''">#{businessType} ,</if>
@ -393,6 +401,7 @@
<if test="currencyName != null and currencyName != ''">currency_name = #{currencyName},</if>
<if test="money != null and money != ''">money = #{money},</if>
<if test="bssm != null and bssm != ''">bssm = #{bssm},</if>
<if test="wbfwf != null and wbfwf != ''">wbfwf = #{wbfwf},</if>
<if test="rate != null and rate != ''">rate = #{rate},</if>
<if test="wldx != null and wldx != ''">wldx = #{wldx},</if>
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
@ -441,6 +450,7 @@
<if test="currencyName != null and currencyName != ''">and currency_name = #{currencyName}</if>
<if test="money != null and money != ''">and money = #{money}</if>
<if test="bssm != null and bssm != ''">and bssm = #{bssm}</if>
<if test="wbfwf != null and wbfwf != ''">and wbfwf = #{wbfwf}</if>
<if test="rate != null and rate != ''">and rate = #{rate}</if>
<if test="wldx != null and wldx != ''">and wldx = #{wldx}</if>
<if test="businessType != null and businessType != ''">and business_type = #{businessType}</if>

View File

@ -19,6 +19,9 @@ import com.hzya.frame.sysnew.user.entity.SysUserEntity;
import com.hzya.frame.voucher.ae.comf.bd.dao.IMdmDBQueryVODAO;
import com.hzya.frame.voucher.ae.comf.bd.dao.IMdmDbFiledVODAO;
import com.hzya.frame.voucher.ae.comf.bd.entity.vo.MdmDBQueryVO;
import com.hzya.frame.voucher.ae.comf.subject.dao.IAeConfSubjectContrastBDao;
import com.hzya.frame.voucher.ae.comf.subject.dao.IAeConfSubjectContrastDao;
import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectContrastEntity;
import com.hzya.frame.voucher.ae.generate.core.vo.CreateVoucherVO;
import com.hzya.frame.voucher.ae.push.service.IAePushVoucherLogService;
import org.springframework.beans.factory.annotation.Autowired;
@ -57,6 +60,10 @@ public class IClaimSKServiceImpl implements IClaimSKService {
private ISysUserDao sysUserDao;
@Autowired
private ISysPersonDao sysPersonDao;
@Autowired
private IAeConfSubjectContrastDao contrastDao;
@Autowired
private IAeConfSubjectContrastBDao contrastBDao;
@ -181,7 +188,9 @@ public class IClaimSKServiceImpl implements IClaimSKService {
/**
* 自动归集
* 1
* 1根据对照表SK/FK 收款付款对照选择 收付款模板
* 2根据模板字段选择方案或者具体数值
* 3组装认领单
*/
@Override
public FeClaimBillHEntity autoCollection(MdmDBQueryVO vo) {
@ -202,6 +211,26 @@ public class IClaimSKServiceImpl implements IClaimSKService {
Assert.state(false, "自动归集失败流水已认领流水id{}。", id);
}
//根据对照表SK/FK 收款付款对照选择 收付款模板
//认领类型 SK/FK D-C- 转入/转出标志
String outflag = kkBankflow.getOutflag();
if ("D".equals(outflag)) {
feClaimBillHEntity.setClaimType("SK");
} else if ("C".equals(outflag)) {
feClaimBillHEntity.setClaimType("FK");
}
AeConfSubjectContrastEntity aeConfSubjectContrastEntity = new AeConfSubjectContrastEntity();
aeConfSubjectContrastEntity.setCode("SK/FK");
aeConfSubjectContrastEntity.setName("收款付款对照");
List<AeConfSubjectContrastEntity> contrastEntityList = contrastDao.query(aeConfSubjectContrastEntity);
System.out.println(contrastEntityList);
if(contrastEntityList.size()==0){
Assert.state(false,"根据编码:{},名称:{},未查到收付款模板","SK/FK","收款付款对照");
}
String contrastId = contrastEntityList.get(0).getId();
//认领日期
LocalDateTime now = LocalDateTime.now();
String billDate = now.format(formatter);
@ -285,14 +314,6 @@ public class IClaimSKServiceImpl implements IClaimSKService {
map.put("explain",null);
//认领类型 SK/FK D-C- 转入/转出标志
String outflag = kkBankflow.getOutflag();
if ("D".equals(outflag)) {
feClaimBillHEntity.setClaimType("SK");
} else if ("C".equals(outflag)) {
feClaimBillHEntity.setClaimType("FK");
}
//来源单据号
String transeqno1 = kkBankflow.getTranseqno1();
feClaimBillHEntity.setSourceFlowBankId(transeqno1);

View File

@ -108,6 +108,7 @@ public class IClaimServiceImpl implements IClaimService {
//描述说明
map.put("explain", feClaimBillB.getExplain());
map.put("bssm", feClaimBillB.getBssm());
map.put("wbfwf", feClaimBillB.getWbfwf());
return feClaimBillH;
@ -193,32 +194,20 @@ public class IClaimServiceImpl implements IClaimService {
List<Map<String, String>> detailList = feClaimBillHEntity.getDetailList();
Map<String, String> map = detailList.get(0);
String zy = map.get("zy");
String zy = map.get("zy");//摘要
feClaimBillHEntity.setZy(zy);
String kxxz = map.get("kxxz");
String kxxz = map.get("kxxz");//款项性质
feClaimBillHEntity.setKxxz(kxxz);
String type = map.get("type");
String type = map.get("type");//款项类别
feClaimBillHEntity.setType(type);
String currencyName = map.get("currencyName");
String currencyName = map.get("currencyName");//币种
feClaimBillHEntity.setCurrencyName(currencyName);
String money = map.get("money");
String money = map.get("money");//金额
feClaimBillHEntity.setMoney(money);
String bssm = map.get("bssm");
String bssm = map.get("bssm");//描述说明
feClaimBillHEntity.setBssm(bssm);
// //摘要
// map.put("zy",kkBankflow.getZy());
// //款项性质
// map.put("nature",null);
// //款项类别
// map.put("type",null);
// //币种
// map.put("currencyName",kkBankflow.getCcy());
// //金额
// map.put("money",kkBankflow.getTranamt());
// //描述说明
// map.put("explain",null);
String wbfwf = map.get("wbfwf");//外币服务费
feClaimBillHEntity.setWbfwf(wbfwf);
//保存认领单
@ -234,6 +223,7 @@ public class IClaimServiceImpl implements IClaimService {
feClaimBillBEntity.setCurrencyName(currencyName);
feClaimBillBEntity.setMoney(money);
feClaimBillBEntity.setBssm(bssm);
feClaimBillBEntity.setWbfwf(wbfwf);
claimBillBDao.save(feClaimBillBEntity);
//更新流水认领单号以及认领状态

View File

@ -4,6 +4,8 @@ import cn.hutool.core.lang.Assert;
import com.hzya.frame.finance.conf.billtemplate.entity.FeConfBillTemplateEntity;
import com.hzya.frame.finance.conf.billtemplate.dao.IFeConfBillTemplateDao;
import com.hzya.frame.finance.conf.billtemplate.service.IFeConfBillTemplateService;
import com.hzya.frame.voucher.ae.comf.bd.dao.IMdmDBQueryVODAO;
import com.hzya.frame.voucher.ae.comf.bd.entity.vo.MdmDBQueryVO;
import com.hzya.frame.voucher.ae.comf.subject.entity.AeConfSubjectClassificationEntity;
import com.hzya.frame.voucher.ae.comf.subject.service.IAeConfSubjectClassificationService;
import org.springframework.stereotype.Service;
@ -36,6 +38,8 @@ public class FeConfBillTemplateServiceImpl extends BaseService<FeConfBillTemplat
@Autowired
private IAeConfSubjectClassificationService classificationService;
@Autowired
private IMdmDBQueryVODAO mdmDBQueryVODAO;
@Override
public List<FeConfBillTemplateEntity> queryAll(FeConfBillTemplateEntity billTemplateEntity) {
@ -101,6 +105,16 @@ public class FeConfBillTemplateServiceImpl extends BaseService<FeConfBillTemplat
public FeConfBillTemplateEntity saveEntity(FeConfBillTemplateEntity billTemplateEntity) {
checkAssistNull("saveEntity",billTemplateEntity);
FeConfBillTemplateEntity save = feConfBillTemplateDao.save(billTemplateEntity);
//新增数据--mdm_bf_sfdj code name
MdmDBQueryVO mdmDBQueryVO = new MdmDBQueryVO();
mdmDBQueryVO.setTablename("mdm_bf_sfdj");
mdmDBQueryVO.setProp1("name");
mdmDBQueryVO.setPropValue1(billTemplateEntity.getName());
mdmDBQueryVO.setProp2("code");
mdmDBQueryVO.setPropValue2(save.getId());
mdmDBQueryVODAO.inserDataVO(mdmDBQueryVO);
return save;
}
@ -108,6 +122,18 @@ public class FeConfBillTemplateServiceImpl extends BaseService<FeConfBillTemplat
public FeConfBillTemplateEntity updateEntity(FeConfBillTemplateEntity billTemplateEntity) {
checkAssistNull("updateEntity",billTemplateEntity);
feConfBillTemplateDao.update(billTemplateEntity);
MdmDBQueryVO mdmDBQueryVO = new MdmDBQueryVO();
mdmDBQueryVO.setTablename("mdm_bf_sfdj");
mdmDBQueryVO.setProp2("code");
mdmDBQueryVO.setPropValue2(billTemplateEntity.getId());
mdmDBQueryVODAO.deleteDataVO(mdmDBQueryVO);
mdmDBQueryVO.setProp1("name");
mdmDBQueryVO.setPropValue1(billTemplateEntity.getName());
mdmDBQueryVODAO.inserDataVO(mdmDBQueryVO);
return billTemplateEntity;
}
@ -115,6 +141,14 @@ public class FeConfBillTemplateServiceImpl extends BaseService<FeConfBillTemplat
public void deleteEntity(FeConfBillTemplateEntity billTemplateEntity) {
checkAssistNull("deleteEntity",billTemplateEntity);
feConfBillTemplateDao.logicRemove(billTemplateEntity);
MdmDBQueryVO mdmDBQueryVO = new MdmDBQueryVO();
mdmDBQueryVO.setTablename("mdm_bf_sfdj");
mdmDBQueryVO.setProp1("name");
mdmDBQueryVO.setPropValue1(billTemplateEntity.getName());
mdmDBQueryVO.setProp2("code");
mdmDBQueryVODAO.deleteDataVO(mdmDBQueryVO);
}

View File

@ -69,17 +69,17 @@
,cnteracctno
,opnbnkinfo
,tranamt
,inamtlot
,tfroutamt
-- ,inamtlot
-- ,tfroutamt
,ccy
,balance
-- ,balance
,outflag
,bussseqno
,bnkprchseqno
-- ,bussseqno
-- ,bnkprchseqno
,trandate
,trantimep
,yt
,deprecptid
-- ,deprecptid
,trantpcdset
,kpdmn
,zy

View File

@ -207,6 +207,11 @@ public class AutoClaimPlugin extends PluginBaseEntity {
MdmDBQueryVO mdmDBQueryVO = new MdmDBQueryVO();
mdmDBQueryVO.setIds(flowMap.get("id").toString());
FeClaimBillHEntity feClaimBillHEntity = claimSKService.autoCollection(mdmDBQueryVO);
String currencyName = feClaimBillHEntity.getCurrencyName();
//外币需要服务费不自动认领
if(!(currencyName.contains("CNY")||currencyName.contains("人民币"))){
return;
}
//自动认领
claimService.generate(feClaimBillHEntity);

View File

@ -28,4 +28,7 @@ public interface IMdmDBQueryVODAO extends IBaseDao<MdmDBQueryVO, String> {
List<Map<String, Object>> queryMdmDateBySK(MdmDBQueryVO entity);
List<Map<String, Object>> queryFlowDataByDate(MdmDBQueryVO entity);
void inserDataVO(MdmDBQueryVO mdmDBQueryVO);
void deleteDataVO(MdmDBQueryVO mdmDBQueryVO);
}

View File

@ -88,4 +88,13 @@ public class MdmDBQueryVODAOImpl extends MybatisGenericDao<MdmDBQueryVO, String>
List<Map<String, Object>> maps = (List<Map<String, Object>>) selectList("com.hzya.frame.voucher.ae.comf.bd.dao.impl.MdmDBQueryVODAOImpl.queryFlowDataByDate", entity);
return maps;
}
@Override
public void inserDataVO(MdmDBQueryVO mdmDBQueryVO) {
insert("com.hzya.frame.voucher.ae.comf.bd.dao.impl.MdmDBQueryVODAOImpl.inserDataVO",mdmDBQueryVO);
}
@Override
public void deleteDataVO(MdmDBQueryVO mdmDBQueryVO) {
insert("com.hzya.frame.voucher.ae.comf.bd.dao.impl.MdmDBQueryVODAOImpl.deleteDataVO",mdmDBQueryVO);
}
}

View File

@ -300,5 +300,58 @@
</trim>
</select>
<insert id="inserDataVO" parameterType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.MdmDBQueryVO">
insert into ${tablename}(
id,
data_status,
sts,
<trim suffix="" suffixOverrides=",">
<if test="prop1 !=null and propValue1 != null">${prop1},</if>
<if test="prop2 !=null and propValue2 != null">${prop2},</if>
<if test="prop3 !=null and propValue3 != null">${prop3},</if>
<if test="prop4 !=null and propValue4 != null">${prop4},</if>
<if test="prop5 !=null and propValue5 != null">${prop5},</if>
<if test="prop6 !=null and propValue6 != null">${prop6},</if>
<if test="prop7 !=null and propValue7 != null">${prop7},</if>
<if test="prop8 !=null and propValue8 != null">${prop8},</if>
<if test="prop9 !=null and propValue9 != null">${prop9},</if>
<if test="prop10 !=null and propValue10 != null">${prop10},</if>
</trim>
)values(
UUID(),
'Y',
'Y',
<trim suffix="" suffixOverrides=",">
<if test="prop1 !=null and propValue1 != null">#{propValue1},</if>
<if test="prop2 !=null and propValue2 != null">#{propValue2},</if>
<if test="prop3 !=null and propValue3 != null">#{propValue3},</if>
<if test="prop4 !=null and propValue4 != null">#{propValue4},</if>
<if test="prop5 !=null and propValue5 != null">#{propValue5},</if>
<if test="prop6 !=null and propValue6 != null">#{propValue6},</if>
<if test="prop7 !=null and propValue7 != null">#{propValue7},</if>
<if test="prop8 !=null and propValue8 != null">#{propValue8},</if>
<if test="prop9 !=null and propValue9 != null">#{propValue9},</if>
<if test="prop10 !=null and propValue10 != null">#{propValue10},</if>
</trim>
)
</insert>
<delete id="deleteDataVO" parameterType="com.hzya.frame.voucher.ae.comf.bd.entity.vo.MdmDBQueryVO">
delete from
${tablename}
where
1=1
<if test="prop1 !=null and propValue1 != null">and ${prop1} = #{propValue1}</if>
<if test="prop2 !=null and propValue2 != null">and ${prop2} = #{propValue2}</if>
<if test="prop3 !=null and propValue3 != null">and ${prop3} = #{propValue3}</if>
<if test="prop4 !=null and propValue4 != null">and ${prop4} = #{propValue4}</if>
<if test="prop5 !=null and propValue5 != null">and ${prop5} = #{propValue5}</if>
<if test="prop6 !=null and propValue6 != null">and ${prop6} = #{propValue6}</if>
<if test="prop7 !=null and propValue7 != null">and ${prop7} = #{propValue7}</if>
<if test="prop8 !=null and propValue8 != null">and ${prop8} = #{propValue8}</if>
<if test="prop9 !=null and propValue9 != null">and ${prop9} = #{propValue9}</if>
<if test="prop10 !=null and propValue10 != null">and ${prop10} = #{propValue10}</if>
</delete>
</mapper>

34
pom.xml
View File

@ -358,23 +358,23 @@
<!-- <flattenMode>resolveCiFriendliesOnly</flattenMode> &lt;!&ndash; 替换${revision}为实际版本 &ndash;&gt;-->
<!-- </configuration>-->
<!-- </plugin>-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.4.1</version> <!-- 建议指定插件版本 -->
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<skip>true</skip> <!-- skip放在execution的configuration中 -->
</configuration>
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.codehaus.mojo</groupId>-->
<!-- <artifactId>flatten-maven-plugin</artifactId>-->
<!-- <version>1.4.1</version> &lt;!&ndash; 建议指定插件版本 &ndash;&gt;-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>flatten</id>-->
<!-- <phase>process-resources</phase>-->
<!-- <goals>-->
<!-- <goal>flatten</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <skip>true</skip> &lt;!&ndash; skip放在execution的configuration中 &ndash;&gt;-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- 资源文件拷贝插件 -->