供应商费用
This commit is contained in:
parent
1028f741ee
commit
0f05e1d72a
@ -845,8 +845,6 @@ public class EmisCommonController extends EmisBaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时扫描运单货物组批次是否正确录入
|
* 定时扫描运单货物组批次是否正确录入
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@ -65,6 +65,8 @@ public class EmisSupplier extends BaseEntity
|
|||||||
private String district;
|
private String district;
|
||||||
/* 地址 */
|
/* 地址 */
|
||||||
private String address;
|
private String address;
|
||||||
|
/* 关联费用类型 */
|
||||||
|
private String feeItemRel;
|
||||||
/* 公司电话 */
|
/* 公司电话 */
|
||||||
private String tel;
|
private String tel;
|
||||||
/* 电子邮件 */
|
/* 电子邮件 */
|
||||||
|
|||||||
@ -40,6 +40,7 @@ import com.xdadan.erp.emis.service.EmisBaseService;
|
|||||||
import com.xdadan.erp.emis.service.excelCellStrategy.CellStyleStrategy;
|
import com.xdadan.erp.emis.service.excelCellStrategy.CellStyleStrategy;
|
||||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
import jodd.util.StringUtil;
|
import jodd.util.StringUtil;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
@ -176,6 +177,7 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
|
|||||||
* @param emisSettleBill 结算总账单
|
* @param emisSettleBill 结算总账单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@SneakyThrows
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public int insertEmisSettleBill(EmisSettleBill emisSettleBill) throws EmisBizError {
|
public int insertEmisSettleBill(EmisSettleBill emisSettleBill) throws EmisBizError {
|
||||||
@ -292,14 +294,33 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
|
|||||||
settleDay=monthUser.getSettleDay();
|
settleDay=monthUser.getSettleDay();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 现金账期从寄件开始10天
|
// 月结账单日根据配置来
|
||||||
emisSettleBill.setCreditPeriodType("1");
|
emisSettleBill.setCreditPeriodType("1");
|
||||||
emisSettleBill.setCreditPeriod(creditPeriod);
|
emisSettleBill.setCreditPeriod(creditPeriod);
|
||||||
emisSettleBill.setSettleDay(settleDay);
|
emisSettleBill.setSettleDay(settleDay);
|
||||||
|
|
||||||
|
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);
|
Date billMonthDate = DateUtils.parseDate(emisSettleBill.getBillMonth() + "-"+settleDay);
|
||||||
Date paymentDueDate = DateUtils.addMonths(billMonthDate,1);
|
paymentDueDate = DateUtils.addMonths(billMonthDate,1);
|
||||||
paymentDueDate= DateUtils.addDays(paymentDueDate,creditPeriod.intValue());
|
paymentDueDate= DateUtils.addDays(paymentDueDate,creditPeriod.intValue());
|
||||||
|
}
|
||||||
|
|
||||||
// 最后付款时间
|
// 最后付款时间
|
||||||
emisSettleBill.setPaymentDueDate(paymentDueDate);
|
emisSettleBill.setPaymentDueDate(paymentDueDate);
|
||||||
|
|||||||
@ -238,6 +238,9 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
|
|||||||
emisWaybillAjustApply.setBlCenterConfirmed("1");
|
emisWaybillAjustApply.setBlCenterConfirmed("1");
|
||||||
emisWaybillAjustApply.setCenterConfirmManCode(getCurrentUser().getEmpCode());
|
emisWaybillAjustApply.setCenterConfirmManCode(getCurrentUser().getEmpCode());
|
||||||
|
|
||||||
|
// 财务中心费用审核:数据部人员通过岗位登记的费用申请:修改项目“运费调整”,财务审批通过后数据直接修改不用再进行层层审核;
|
||||||
|
emisWaybillAjustApply.getApplyType()
|
||||||
|
|
||||||
// 获取账单状态,若账单处于非未确认状态,不允许审核
|
// 获取账单状态,若账单处于非未确认状态,不允许审核
|
||||||
List<EmisSettleSubBill> emisSettleSubBillList=getSettleSubBillListByBillCode(emisWaybillAjustApply.getBillCode());
|
List<EmisSettleSubBill> emisSettleSubBillList=getSettleSubBillListByBillCode(emisWaybillAjustApply.getBillCode());
|
||||||
if(!CollectionUtils.isEmpty(emisSettleSubBillList)){
|
if(!CollectionUtils.isEmpty(emisSettleSubBillList)){
|
||||||
@ -286,12 +289,8 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 运单更新
|
// 运单更新
|
||||||
|
|||||||
@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="city" column="city" />
|
<result property="city" column="city" />
|
||||||
<result property="district" column="district" />
|
<result property="district" column="district" />
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address" />
|
||||||
|
<result property="feeItemRel" column="fee_item_rel" />
|
||||||
<result property="tel" column="tel" />
|
<result property="tel" column="tel" />
|
||||||
<result property="email" column="email" />
|
<result property="email" column="email" />
|
||||||
<result property="contact" column="contact" />
|
<result property="contact" column="contact" />
|
||||||
@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEmisSupplierVo">
|
<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>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEmisSupplierList" parameterType="EmisSupplier" resultMap="EmisSupplierResult">
|
<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="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="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'">
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||||
and FIND_IN_SET(#{params.privSiteCode},biz_site)
|
and FIND_IN_SET(#{params.privSiteCode},biz_site)
|
||||||
</if>
|
</if>
|
||||||
@ -123,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEmisSupplierById" parameterType="Long" resultMap="EmisSupplierResult">
|
<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
|
from emis_supplier a
|
||||||
where a.id = #{id}
|
where a.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
@ -146,6 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="city != null and city != ''">city,</if>
|
<if test="city != null and city != ''">city,</if>
|
||||||
<if test="district != null and district != ''">district,</if>
|
<if test="district != null and district != ''">district,</if>
|
||||||
<if test="address != null and address != ''">address,</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="tel != null and tel != ''">tel,</if>
|
||||||
<if test="email != null and email != ''">email,</if>
|
<if test="email != null and email != ''">email,</if>
|
||||||
<if test="contact != null and contact != ''">contact,</if>
|
<if test="contact != null and contact != ''">contact,</if>
|
||||||
@ -176,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="city != null and city != ''">#{city},</if>
|
<if test="city != null and city != ''">#{city},</if>
|
||||||
<if test="district != null and district != ''">#{district},</if>
|
<if test="district != null and district != ''">#{district},</if>
|
||||||
<if test="address != null and address != ''">#{address},</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="tel != null and tel != ''">#{tel},</if>
|
||||||
<if test="email != null and email != ''">#{email},</if>
|
<if test="email != null and email != ''">#{email},</if>
|
||||||
<if test="contact != null and contact != ''">#{contact},</if>
|
<if test="contact != null and contact != ''">#{contact},</if>
|
||||||
@ -195,6 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<update id="updateEmisSupplier" parameterType="EmisSupplier">
|
<update id="updateEmisSupplier" parameterType="EmisSupplier">
|
||||||
update emis_supplier
|
update emis_supplier
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="code != null and code != ''">code = #{code},</if>
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
|
<if test="nameEn != null and nameEn != ''">name_en = #{nameEn},</if>
|
||||||
<if test="settledType != null and settledType != ''">settled_type = #{settledType},</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="city != null and city != ''">city = #{city},</if>
|
||||||
<if test="district != null and district != ''">district = #{district},</if>
|
<if test="district != null and district != ''">district = #{district},</if>
|
||||||
<if test="address != null and address != ''">address = #{address},</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="tel != null and tel != ''">tel = #{tel},</if>
|
||||||
<if test="email != null and email != ''">email = #{email},</if>
|
<if test="email != null and email != ''">email = #{email},</if>
|
||||||
<if test="contact != null and contact != ''">contact = #{contact},</if>
|
<if test="contact != null and contact != ''">contact = #{contact},</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user