add 普通,工作组,资料网员编辑时修改邮寄信息中关联的联系人
This commit is contained in:
+4
-2
@@ -10,7 +10,7 @@ import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.mail.PayMailBillVO;
|
||||
import com.jero.mail.entity.PayMailBill;
|
||||
import com.jero.mail.entity.PayMailBillSearch;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -51,7 +51,7 @@ public interface PayMailBillMapper extends BaseMapper<PayMailBill> {
|
||||
* @return
|
||||
*/
|
||||
|
||||
IPage<PayMailBill> pageList(Page<PayMailBill> page, @org.apache.ibatis.annotations.Param(Constants.WRAPPER) QueryWrapper<PayMailBill> queryWrapper);
|
||||
IPage<PayMailBill> pageList(Page<PayMailBill> page, @Param(Constants.WRAPPER) QueryWrapper<PayMailBill> queryWrapper);
|
||||
|
||||
|
||||
List<PayMailBill> pageListss(@Param("payMailBillSearch") PayMailBillSearch payMailBillSearch);
|
||||
@@ -73,4 +73,6 @@ public interface PayMailBillMapper extends BaseMapper<PayMailBill> {
|
||||
|
||||
PayContactsManagement print(@Param("id") String id);
|
||||
|
||||
Integer updateByProjectId(@Param("updated") PayMailBill payMailBill, @Param("projectId") String projectId);
|
||||
|
||||
}
|
||||
|
||||
+83
-1
@@ -1,6 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.mail.mapper.PayMailBillMapper">
|
||||
<sql id="Base_Column_List">
|
||||
id,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
bill_no,
|
||||
invoice_amount,
|
||||
post_status,
|
||||
send_method,
|
||||
post_no,
|
||||
contact_id,
|
||||
contact_name,
|
||||
contact_mobile,
|
||||
bill_date,
|
||||
send_date,
|
||||
remark,
|
||||
project_name
|
||||
</sql>
|
||||
<resultMap id="MailBillVO" type="com.jero.mail.entity.PayMailBill">
|
||||
<result property="id" column="id"></result>
|
||||
<result property="createBy" column="create_by"></result>
|
||||
@@ -149,5 +168,68 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!--auto generated by MybatisCodeHelper on 2022-08-11-->
|
||||
<update id="updateByProjectId">
|
||||
update pay_mail_bill
|
||||
<set>
|
||||
<if test="updated.id != null and updated.id != ''">
|
||||
id = #{updated.id},
|
||||
</if>
|
||||
<if test="updated.createBy != null and updated.createBy != ''">
|
||||
create_by = #{updated.createBy},
|
||||
</if>
|
||||
<if test="updated.createTime != null">
|
||||
create_time = #{updated.createTime},
|
||||
</if>
|
||||
<if test="updated.updateBy != null and updated.updateBy != ''">
|
||||
update_by = #{updated.updateBy},
|
||||
</if>
|
||||
<if test="updated.updateTime != null">
|
||||
update_time = #{updated.updateTime},
|
||||
</if>
|
||||
<if test="updated.billNo != null and updated.billNo != ''">
|
||||
bill_no = #{updated.billNo},
|
||||
</if>
|
||||
<if test="updated.invoiceAmount != null">
|
||||
invoice_amount = #{updated.invoiceAmount},
|
||||
</if>
|
||||
<if test="updated.postStatus != null">
|
||||
post_status = #{updated.postStatus},
|
||||
</if>
|
||||
<if test="updated.sendMethod != null">
|
||||
send_method = #{updated.sendMethod},
|
||||
</if>
|
||||
<if test="updated.postNo != null and updated.postNo != ''">
|
||||
post_no = #{updated.postNo},
|
||||
</if>
|
||||
<if test="updated.contactId != null and updated.contactId != ''">
|
||||
contact_id = #{updated.contactId},
|
||||
</if>
|
||||
<if test="updated.contactName != null and updated.contactName != ''">
|
||||
contact_name = #{updated.contactName},
|
||||
</if>
|
||||
<if test="updated.contactMobile != null and updated.contactMobile != ''">
|
||||
contact_mobile = #{updated.contactMobile},
|
||||
</if>
|
||||
<if test="updated.billDate != null">
|
||||
bill_date = #{updated.billDate},
|
||||
</if>
|
||||
<if test="updated.sendDate != null">
|
||||
send_date = #{updated.sendDate},
|
||||
</if>
|
||||
<if test="updated.remark != null and updated.remark != ''">
|
||||
remark = #{updated.remark},
|
||||
</if>
|
||||
<if test="updated.projectName != null and updated.projectName != ''">
|
||||
project_name = #{updated.projectName},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
id in (
|
||||
select bill_id
|
||||
from pay_mail_bill_project
|
||||
where project_id = #{projectId}
|
||||
)
|
||||
</where>
|
||||
</update>
|
||||
</mapper>
|
||||
+7
@@ -88,4 +88,11 @@ public interface IPayMailBillService extends IService<PayMailBill> {
|
||||
|
||||
PayContactsManagement print(String id);
|
||||
|
||||
/**
|
||||
* 如果有邮寄信息更新邮寄联系人信息
|
||||
* @param ContactId 邮寄联系人id
|
||||
* @param projectId 项目id
|
||||
*/
|
||||
void updateContactByProjectId(String ContactId,String projectId);
|
||||
|
||||
}
|
||||
|
||||
+17
@@ -565,6 +565,23 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
|
||||
return payMailBillMapper.print(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateContactByProjectId(String ContactId, String projectId) {
|
||||
PayContactsManagement contact= payContactsManagementMapper.selectById(ContactId);
|
||||
if (contact == null){
|
||||
return;
|
||||
}
|
||||
PayMailBill payMailBill = new PayMailBill();
|
||||
payMailBill.setContactId(ContactId);
|
||||
payMailBill.setContactName(contact.getName());
|
||||
payMailBill.setContactMobile(contact.getPhone());
|
||||
payMailBill.setEmail(contact.getEmail());
|
||||
payMailBill.setPostalCode(contact.getPostalCode());
|
||||
payMailBill.setContactAddress(contact.getContactAddress());
|
||||
|
||||
payMailBillMapper.updateByProjectId(payMailBill,projectId);
|
||||
}
|
||||
|
||||
|
||||
//校验不同项目是否属于同一个公司,开票金额是否大于当前未开票金额,企业名称是否审核
|
||||
private String checkCompanyProject(List<PayMailBillProject> bmpList) {
|
||||
|
||||
Reference in New Issue
Block a user