供应商费用

This commit is contained in:
linfso 2025-06-17 08:38:36 +08:00
parent 1028f741ee
commit 0f05e1d72a
5 changed files with 45 additions and 15 deletions

View File

@ -845,8 +845,6 @@ public class EmisCommonController extends EmisBaseController
}
/**
* 定时扫描运单货物组批次是否正确录入
* @return

View File

@ -65,6 +65,8 @@ public class EmisSupplier extends BaseEntity
private String district;
/* 地址 */
private String address;
/* 关联费用类型 */
private String feeItemRel;
/* 公司电话 */
private String tel;
/* 电子邮件 */

View File

@ -40,6 +40,7 @@ import com.xdadan.erp.emis.service.EmisBaseService;
import com.xdadan.erp.emis.service.excelCellStrategy.CellStyleStrategy;
import com.xdadan.erp.emis.utils.WaybillHelper;
import jodd.util.StringUtil;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
@ -176,6 +177,7 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
* @param emisSettleBill 结算总账单
* @return 结果
*/
@SneakyThrows
@Transactional
@Override
public int insertEmisSettleBill(EmisSettleBill emisSettleBill) throws EmisBizError {
@ -292,14 +294,33 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
settleDay=monthUser.getSettleDay();
}
// 现金账期从寄件开始10天
// 月结账单日根据配置来
emisSettleBill.setCreditPeriodType("1");
emisSettleBill.setCreditPeriod(creditPeriod);
emisSettleBill.setSettleDay(settleDay);
Date billMonthDate = DateUtils.parseDate(emisSettleBill.getBillMonth() + "-"+settleDay);
Date paymentDueDate = DateUtils.addMonths(billMonthDate,1);
paymentDueDate= DateUtils.addDays(paymentDueDate,creditPeriod.intValue());
Date paymentDueDate = null;
/*
bug:1610 调整
周结账期14天TMS系统配置的是7天,例如1号至7号,8号出账单,最后回款日14号(T+6,T为出账日)回款100%提成,超期未回无提成;
半月结账期30天TMS系统配置的是15天,例如1号至15号,16号出账单,最后回款日30号(T+14,T为出账日)回款100%提成;超期未回无提成;
*/
if(creditPeriod.intValue()==7){
// 获取今日零点 T+6,T为出账日
String currDayStr=DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date());
Date currDayDate=DateUtils.parseDate(currDayStr,DateUtils.YYYY_MM_DD);
paymentDueDate = DateUtils.addDays(currDayDate,7);
}
else if(creditPeriod.intValue()==15){
String currDayStr=DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date());
Date currDayDate=DateUtils.parseDate(currDayStr,DateUtils.YYYY_MM_DD);
paymentDueDate = DateUtils.addDays(currDayDate,15);
}
else{
Date billMonthDate = DateUtils.parseDate(emisSettleBill.getBillMonth() + "-"+settleDay);
paymentDueDate = DateUtils.addMonths(billMonthDate,1);
paymentDueDate= DateUtils.addDays(paymentDueDate,creditPeriod.intValue());
}
// 最后付款时间
emisSettleBill.setPaymentDueDate(paymentDueDate);

View File

@ -238,6 +238,9 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
emisWaybillAjustApply.setBlCenterConfirmed("1");
emisWaybillAjustApply.setCenterConfirmManCode(getCurrentUser().getEmpCode());
// 财务中心费用审核:数据部人员通过岗位登记的费用申请:修改项目“运费调整”,财务审批通过后数据直接修改不用再进行层层审核;
emisWaybillAjustApply.getApplyType()
// 获取账单状态,若账单处于非未确认状态,不允许审核
List<EmisSettleSubBill> emisSettleSubBillList=getSettleSubBillListByBillCode(emisWaybillAjustApply.getBillCode());
if(!CollectionUtils.isEmpty(emisSettleSubBillList)){
@ -286,12 +289,8 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
}
}
}
}
}
// 运单更新

View File

@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="city" column="city" />
<result property="district" column="district" />
<result property="address" column="address" />
<result property="feeItemRel" column="fee_item_rel" />
<result property="tel" column="tel" />
<result property="email" column="email" />
<result property="contact" column="contact" />
@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEmisSupplierVo">
select id, code, name, name_en, settled_type, trans_type, biz_site, biz_site_name, company_name, company_type, licence_no, country, province, city, district, address, tel, email, contact, phone, status, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_supplier
select id, code, name, name_en, settled_type, trans_type, biz_site, biz_site_name, company_name, company_type, licence_no, country, province, city, district, address, fee_item_rel, tel, email, contact, phone, status, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_supplier
</sql>
<select id="selectEmisSupplierList" parameterType="EmisSupplier" resultMap="EmisSupplierResult">
@ -68,6 +69,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<if test="feeItemRel != null and feeItemRel != ''">
and FIND_IN_SET(#{feeItemRel},fee_item_rel)
</if>
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and FIND_IN_SET(#{params.privSiteCode},biz_site)
</if>
@ -123,11 +129,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectEmisSupplierById" parameterType="Long" resultMap="EmisSupplierResult">
select id, code, name, name_en, settled_type, trans_type, biz_site, biz_site_name, company_name, company_type, licence_no, country, province, city, district, address, tel, email, contact, phone, status, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, code, name, name_en, settled_type, trans_type, biz_site, biz_site_name, company_name, company_type, licence_no, country, province, city, district, address, fee_item_rel, tel, email, contact, phone, status, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_supplier a
where a.id = #{id}
</select>
<insert id="insertEmisSupplier" parameterType="EmisSupplier" useGeneratedKeys="true" keyProperty="id">
insert into emis_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -146,6 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="city != null and city != ''">city,</if>
<if test="district != null and district != ''">district,</if>
<if test="address != null and address != ''">address,</if>
<if test="feeItemRel != null and feeItemRel != ''">fee_item_rel,</if>
<if test="tel != null and tel != ''">tel,</if>
<if test="email != null and email != ''">email,</if>
<if test="contact != null and contact != ''">contact,</if>
@ -159,7 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null and code != ''">#{code},</if>
<if test="name != null and name != ''">#{name},</if>
@ -176,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="city != null and city != ''">#{city},</if>
<if test="district != null and district != ''">#{district},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="feeItemRel != null and feeItemRel != ''">#{feeItemRel},</if>
<if test="tel != null and tel != ''">#{tel},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="contact != null and contact != ''">#{contact},</if>
@ -189,12 +197,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</trim>
</insert>
<update id="updateEmisSupplier" parameterType="EmisSupplier">
update emis_supplier
<trim prefix="SET" suffixOverrides=",">
<if test="code != null and code != ''">code = #{code},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
<if test="settledType != null and settledType != ''">settled_type = #{settledType},</if>
@ -209,6 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="city != null and city != ''">city = #{city},</if>
<if test="district != null and district != ''">district = #{district},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="feeItemRel != null and feeItemRel != ''">fee_item_rel = #{feeItemRel},</if>
<if test="tel != null and tel != ''">tel = #{tel},</if>
<if test="email != null and email != ''">email = #{email},</if>
<if test="contact != null and contact != ''">contact = #{contact},</if>