Merge pull request 'develop' (#33) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/33
This commit is contained in:
smshen 2025-05-26 13:29:11 +08:00
commit f32b16ea02
4 changed files with 30 additions and 5 deletions

View File

@ -4058,15 +4058,16 @@ public class EmisBaseService {
* 检查月结客户首次签约日期,首次签约之前开的不允许修改
*
* @param emisWaybillOld
* @param emisWaybillNew
* @throws EmisBizError
*/
protected void checkFirstSigningDay(EmisWaybill emisWaybillOld) throws EmisBizError {
if (emisWaybillOld == null || emisWaybillOld.getOrderDate() == null || StringUtil.isBlank(emisWaybillOld.getCustNo())) {
protected void checkFirstSigningDay(EmisWaybill emisWaybillOld, EmisWaybill emisWaybillNew) throws EmisBizError {
if (emisWaybillOld == null || emisWaybillOld.getOrderDate() == null || emisWaybillNew == null || StringUtil.isBlank(emisWaybillNew.getCustNo())) {
return;
}
EmisCustomerUser emisCustomerUser = emisCustomerUserMapper
.selectMonthCustomerByMonthlyPayCode(emisWaybillOld.getCustNo());
.selectMonthCustomerByMonthlyPayCode(emisWaybillNew.getCustNo());
if (emisCustomerUser == null || StringUtil.isBlank(emisCustomerUser.getFirstSigningDay())) {
return;
}

View File

@ -110,7 +110,10 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
}
// 检查月结客户首次签约日期,首次签约之前开的不允许修改
checkFirstSigningDay(emisWaybillOld);
checkFirstSigningDay(emisWaybillOld, getEmisWaybillNewFromJson(emisWaybillAjustApply));
// 检查月结/现金客户额度
checkUseQuotaCredit(emisWaybillOld, getEmisWaybillNewFromJson(emisWaybillAjustApply));
// 插入数据
emisWaybillAjustApplyMapper.insertEmisWaybillAjustApply(emisWaybillAjustApply);
@ -131,6 +134,14 @@ public class EmisWaybillAjustApplyServiceImpl extends EmisBaseService implements
return 1;
}
private EmisWaybill getEmisWaybillNewFromJson(EmisWaybillAjustApply emisWaybillAjustApply) {
JSONObject jsonObject = JSONObject.parseObject(emisWaybillAjustApply.getJsonData());
JSONObject newValueJObj=jsonObject.getJSONObject("newValue");
WaybillOrder waybillOrder=newValueJObj.toJavaObject(WaybillOrder.class);
EmisWaybill emisWaybillSave = waybillOrder.toDb();
return emisWaybillSave;
}
/**
* 修改运单调整申请
*

View File

@ -34,6 +34,11 @@
<result property="updateTime" column="update_time" />
<result property="createSite" column="create_site" />
<result property="updateSite" column="update_site" />
<result property="createByName" column="create_by_name" />
<result property="updateByName" column="update_by_name" />
<result property="createSiteName" column="create_site_name" />
<result property="updateSiteName" column="update_site_name" />
</resultMap>
<!-- 查询区域名称 -->

View File

@ -122,7 +122,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
smi.send_month,
bri.settle_type,
bri.open_bill_remark,
pdi.pay_days
pdi.pay_days,
cu.emp_name as create_by_name,
uu.emp_name as update_by_name,
cs.site_name as create_site_name,
us.site_name as update_site_name
FROM emis_settle_invoice_ch_record a
LEFT JOIN (
SELECT
@ -213,6 +217,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE bd.del_flag = '0'
GROUP BY bd.id, b.settle_type
) bri ON bri.id = a.id
LEFT JOIN sys_user cu ON cu.user_id = a.create_by AND cu.del_flag = '0'
LEFT JOIN sys_user uu ON uu.user_id = a.update_by AND uu.del_flag = '0'
LEFT JOIN emis_site cs ON cs.site_code = a.create_site AND cs.del_flag = '0'
LEFT JOIN emis_site us ON us.site_code = a.update_site AND us.del_flag = '0'
WHERE a.del_flag = '0'
<if test="id != null">AND a.id = #{id}</if>
<if test="reqNo != null and reqNo != ''">AND a.req_no = #{reqNo}</if>