demand: 客户账单查询支持查询超期未回款的账单 问题件查询支持根据销售相关字段查询 增加批量修改成本接口
This commit is contained in:
parent
4a9382c947
commit
9780139eb3
@ -1,11 +1,11 @@
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisTmsCostFeeController.java
|
||||
* @author linfso
|
||||
* @date 2024-10-10 01:53:20
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @version v1.0
|
||||
* @Description: <p> TMS运输成本账单 控制器 </p>
|
||||
*/
|
||||
|
||||
@ -48,7 +48,7 @@ import com.xdadan.erp.emis.service.IEmisTmsCostFeeService;
|
||||
|
||||
/**
|
||||
* TMS运输成本账单Controller
|
||||
*
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-10-10 01:53:20
|
||||
*/
|
||||
@ -88,8 +88,8 @@ public class EmisTmsCostFeeController extends BaseController
|
||||
|
||||
/**
|
||||
* 检查是否重复
|
||||
*
|
||||
* @param emisTmsCostFee
|
||||
*
|
||||
* @param emisTmsCostFee
|
||||
* @return 数量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCostFee:list')")
|
||||
@ -239,6 +239,38 @@ public class EmisTmsCostFeeController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改TMS运输成本账单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCostFee:batchEdit')")
|
||||
@Log(title = "TMS运输成本账单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/batchEdit")
|
||||
public AjaxResult batchEdit(@RequestBody List<EmisTmsCostFee> emisTmsCostFeeList)
|
||||
{
|
||||
try {
|
||||
if (CollectionUtil.isEmpty(emisTmsCostFeeList)) {
|
||||
return AjaxResult.error("修改数据不能为空");
|
||||
}
|
||||
int updateCount = 0;
|
||||
for (EmisTmsCostFee emisTmsCostFee : emisTmsCostFeeList) {
|
||||
updateCount += emisTmsCostFeeService.updateEmisTmsCostFee(emisTmsCostFee);
|
||||
}
|
||||
return toAjax(updateCount);
|
||||
}catch(EmisBizError ex){
|
||||
ex.printStackTrace();
|
||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if(ex instanceof EmisBizError){
|
||||
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
||||
}
|
||||
|
||||
return AjaxResult.error("服务器异常,联系客服");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除TMS运输成本账单
|
||||
*/
|
||||
|
||||
@ -93,6 +93,15 @@ public class EmisWaybillProblemInfo extends BaseEntity
|
||||
private String blSee;
|
||||
/* 文件路径 */
|
||||
private String filePath;
|
||||
/* 寄件日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date sendDate;
|
||||
/* 销售联系人 */
|
||||
private String salesmen;
|
||||
/* 回款联系人 */
|
||||
private String payee;
|
||||
/* 销售支持 */
|
||||
private String salesSupport;
|
||||
|
||||
|
||||
// 扩展 通知网点
|
||||
|
||||
@ -1433,6 +1433,23 @@
|
||||
and payment_status != '1'
|
||||
</if>
|
||||
|
||||
<if test="params.blOverdueUnpaid != null and params.blOverdueUnpaid == 1">
|
||||
and a.payment_status in ('0','2')
|
||||
and a.payment_due_date is not null
|
||||
and DATE(a.payment_due_date) <![CDATA[ < ]]> CURDATE()
|
||||
</if>
|
||||
<!-- <if test="params.blOverdueUnpaid != null and params.blOverdueUnpaid == 0">-->
|
||||
<!-- and a.payment_status = '1'-->
|
||||
<!-- and a.payment_due_date is not null-->
|
||||
<!-- and exists (-->
|
||||
<!-- select 1-->
|
||||
<!-- from emis_settle_pay_record espr-->
|
||||
<!-- where espr.del_flag = '0'-->
|
||||
<!-- and espr.settle_bill_no = a.settle_bill_no-->
|
||||
<!-- and DATE(a.payment_due_date) <![CDATA[ < ]]> espr.trade_date-->
|
||||
<!-- )-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="params.billCode != null and params.billCode != ''">
|
||||
and exists (
|
||||
select 1 from emis_settle_sub_bill b
|
||||
@ -1683,6 +1700,21 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectUnpaidMonthlyCustomerBillsForAutoDeactivate" resultType="com.xdadan.erp.emis.domain.EmisSettleBill">
|
||||
select
|
||||
a.cust_no as custNo,
|
||||
a.payment_due_date as paymentDueDate
|
||||
from emis_settle_bill a
|
||||
inner join emis_customer_user cu
|
||||
on cu.monthly_pay_code = a.cust_no
|
||||
and cu.del_flag = '0'
|
||||
and cu.status = '1'
|
||||
and cu.bl_special_user = '2'
|
||||
where a.del_flag = '0'
|
||||
and a.payment_status in ('0', '2')
|
||||
and a.payment_due_date is not null
|
||||
</select>
|
||||
|
||||
<delete id="deleteEmisSettleBillById" parameterType="Long">
|
||||
update emis_settle_bill set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
@ -32,6 +32,10 @@
|
||||
<result property="dealResult" column="deal_result" />
|
||||
<result property="blSee" column="bl_see" />
|
||||
<result property="filePath" column="file_path" />
|
||||
<result property="sendDate" column="send_date" />
|
||||
<result property="salesmen" column="salesmen" />
|
||||
<result property="payee" column="payee" />
|
||||
<result property="salesSupport" column="sales_support" />
|
||||
|
||||
<association property="problemTypeName" column="problem_type" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectProblemTypeNameById"/>
|
||||
<association property="sendSiteName" column="send_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||
@ -43,59 +47,78 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisWaybillProblemInfoVo">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, problem_type, problem_title, problem_cause, send_site, send_site_code, register_man_code, register_man_dept, register_site_code, register_date, register_save_date, data_from, status, is_send_site_register, bl_reversion, reversion_str, reversion_man, reversion_man_code, reversion_site_code, reversion_date, bl_checkok, deal_result, bl_see, file_path, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_waybill_problem_info
|
||||
select
|
||||
a.id, a.bill_code, a.main_bill_code, a.bl_sub_bill, a.problem_type, a.problem_title, a.problem_cause,
|
||||
a.send_site, a.send_site_code, a.register_man_code, a.register_man_dept, a.register_site_code,
|
||||
a.register_date, a.register_save_date, a.data_from, a.status, a.is_send_site_register, a.bl_reversion,
|
||||
a.reversion_str, a.reversion_man, a.reversion_man_code, a.reversion_site_code, a.reversion_date,
|
||||
a.bl_checkok, a.deal_result, a.bl_see, a.file_path, a.del_flag, a.create_by, a.create_time,
|
||||
a.update_by, a.update_time, a.remark, a.create_site, a.update_site,
|
||||
b.send_date, b.salesmen, b.payee, c.sales_support
|
||||
from emis_waybill_problem_info a
|
||||
left join emis_waybill b on a.bill_code = b.bill_code and b.del_flag = '0'
|
||||
left join emis_waybill_other c on b.bill_code = c.bill_code and c.del_flag = '0'
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisWaybillProblemInfoList" parameterType="EmisWaybillProblemInfo" resultMap="EmisWaybillProblemInfoResult">
|
||||
<include refid="selectEmisWaybillProblemInfoVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') ) </if>
|
||||
<if test="mainBillCode != null and mainBillCode != ''"> and main_bill_code=#{mainBillCode}</if>
|
||||
<if test="blSubBill != null and blSubBill != ''"> and bl_sub_bill=#{blSubBill}</if>
|
||||
a.del_flag='0'
|
||||
<if test="id != null "> and a.id = #{id}</if>
|
||||
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(a.`bill_code`,#{billCode}) or a.bill_code like concat('%', #{billCode}, '%') ) </if>
|
||||
<if test="mainBillCode != null and mainBillCode != ''"> and a.main_bill_code=#{mainBillCode}</if>
|
||||
<if test="blSubBill != null and blSubBill != ''"> and a.bl_sub_bill=#{blSubBill}</if>
|
||||
|
||||
<if test="problemType != null and problemType != ''"> and FIND_IN_SET(problem_type,#{problemType})</if>
|
||||
<if test="problemTitle != null and problemTitle != ''"> and problem_title like concat('%', #{problemTitle}, '%')</if>
|
||||
<if test="problemCause != null and problemCause != ''"> and problem_cause like concat('%', #{problemCause}, '%')</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''"> and send_site_code=#{sendSiteCode}</if>
|
||||
<if test="registerManCode != null and registerManCode != ''"> and register_man_code=#{registerManCode}</if>
|
||||
<if test="registerManDept != null and registerManDept != ''"> and register_man_dept like concat('%', #{registerManDept}, '%')</if>
|
||||
<if test="registerSiteCode != null and registerSiteCode != ''"> and register_site_code=#{registerSiteCode}</if>
|
||||
<if test="registerDate != null "> and register_date = #{registerDate}</if>
|
||||
<if test="dataFrom != null and dataFrom != ''"> and data_from=#{dataFrom}</if>
|
||||
<if test="status != null and status != ''"> and status=#{status}</if>
|
||||
<if test="isSendSiteRegister != null and isSendSiteRegister != ''"> and is_send_site_register=#{isSendSiteRegister}</if>
|
||||
<if test="dealResult != null and dealResult != ''"> and deal_result=#{dealResult}</if>
|
||||
<if test="blReversion != null and blReversion != ''"> and bl_reversion=#{blReversion}</if>
|
||||
<if test="reversionStr != null and reversionStr != ''"> and reversion_str like concat('%', #{reversionStr}, '%')</if>
|
||||
<if test="reversionMan != null and reversionMan != ''"> and reversion_man like concat('%', #{reversionMan}, '%')</if>
|
||||
<if test="reversionManCode != null and reversionManCode != ''"> and reversion_man_code=#{reversionManCode}</if>
|
||||
<if test="reversionDate != null and reversionDate != ''"> and reversion_date like concat('%', #{reversionDate}, '%')</if>
|
||||
<if test="blCheckok != null and blCheckok != ''"> and bl_checkok=#{blCheckok}</if>
|
||||
<if test="blSee != null and blSee != ''"> and bl_see=#{blSee}</if>
|
||||
<if test="filePath != null and filePath != ''"> and file_path like concat('%', #{filePath}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</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="problemType != null and problemType != ''"> and FIND_IN_SET(a.problem_type,#{problemType})</if>
|
||||
<if test="problemTitle != null and problemTitle != ''"> and a.problem_title like concat('%', #{problemTitle}, '%')</if>
|
||||
<if test="problemCause != null and problemCause != ''"> and a.problem_cause like concat('%', #{problemCause}, '%')</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''"> and a.send_site_code=#{sendSiteCode}</if>
|
||||
<if test="registerManCode != null and registerManCode != ''"> and a.register_man_code=#{registerManCode}</if>
|
||||
<if test="registerManDept != null and registerManDept != ''"> and a.register_man_dept like concat('%', #{registerManDept}, '%')</if>
|
||||
<if test="registerSiteCode != null and registerSiteCode != ''"> and a.register_site_code=#{registerSiteCode}</if>
|
||||
<if test="registerDate != null "> and a.register_date = #{registerDate}</if>
|
||||
<if test="dataFrom != null and dataFrom != ''"> and a.data_from=#{dataFrom}</if>
|
||||
<if test="status != null and status != ''"> and a.status=#{status}</if>
|
||||
<if test="isSendSiteRegister != null and isSendSiteRegister != ''"> and a.is_send_site_register=#{isSendSiteRegister}</if>
|
||||
<if test="dealResult != null and dealResult != ''"> and a.deal_result=#{dealResult}</if>
|
||||
<if test="blReversion != null and blReversion != ''"> and a.bl_reversion=#{blReversion}</if>
|
||||
<if test="reversionStr != null and reversionStr != ''"> and a.reversion_str like concat('%', #{reversionStr}, '%')</if>
|
||||
<if test="reversionMan != null and reversionMan != ''"> and a.reversion_man like concat('%', #{reversionMan}, '%')</if>
|
||||
<if test="reversionManCode != null and reversionManCode != ''"> and a.reversion_man_code=#{reversionManCode}</if>
|
||||
<if test="reversionDate != null and reversionDate != ''"> and a.reversion_date like concat('%', #{reversionDate}, '%')</if>
|
||||
<if test="blCheckok != null and blCheckok != ''"> and a.bl_checkok=#{blCheckok}</if>
|
||||
<if test="blSee != null and blSee != ''"> and a.bl_see=#{blSee}</if>
|
||||
<if test="filePath != null and filePath != ''"> and a.file_path like concat('%', #{filePath}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and a.del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and a.create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and a.create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and a.update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and a.update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="createSite != null and createSite != ''"> and a.create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and a.update_site like concat('%', #{updateSite}, '%')</if>
|
||||
<if test="salesmen != null and salesmen != ''">
|
||||
and b.salesmen like concat('%', #{salesmen}, '%')
|
||||
</if>
|
||||
<if test="payee != null and payee != ''">
|
||||
and b.payee like concat('%', #{payee}, '%')
|
||||
</if>
|
||||
<if test="salesSupport != null and salesSupport != ''">
|
||||
and c.sales_support like concat('%', #{salesSupport}, '%')
|
||||
</if>
|
||||
|
||||
<if test="params.beginRegisterDate != null and params.beginRegisterDate != ''">
|
||||
and register_date <![CDATA[ >= ]]> #{params.beginRegisterDate}
|
||||
and a.register_date <![CDATA[ >= ]]> #{params.beginRegisterDate}
|
||||
</if>
|
||||
<if test="params.endRegisterDate != null and params.endRegisterDate != ''">
|
||||
and register_date <![CDATA[ <= ]]> #{params.endRegisterDate}
|
||||
and a.register_date <![CDATA[ <= ]]> #{params.endRegisterDate}
|
||||
</if>
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
register_site_code=#{params.privSiteCode}
|
||||
a.register_site_code=#{params.privSiteCode}
|
||||
or
|
||||
send_site_code=#{params.privSiteCode}
|
||||
a.send_site_code=#{params.privSiteCode}
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user