Merge branch 'prod/20260206' into develop

This commit is contained in:
曹鹏飞 2026-02-06 16:54:18 +08:00
commit 5ebcdf30e6
7 changed files with 12 additions and 16 deletions

View File

@ -221,7 +221,7 @@ public class AdminDeviceService {
ent.setStartWarrantyDate(null); ent.setStartWarrantyDate(null);
ent.setWarrantyState(null); ent.setWarrantyState(null);
} }
if (Objects.nonNull(u.getAgent__r())) { if (Objects.isNull(ent.getId()) && Objects.nonNull(u.getAgent__r())) {
TBaseCustomer customer = agents.stream() TBaseCustomer customer = agents.stream()
.filter(agent -> agent.getAgencyCompanyCode().equals(u.getAgent__r().getId())) .filter(agent -> agent.getAgencyCompanyCode().equals(u.getAgent__r().getId()))
.findFirst() .findFirst()
@ -238,10 +238,8 @@ public class AdminDeviceService {
} }
ent.setAgentCode(customer.getAgencyCompanyCode()); ent.setAgentCode(customer.getAgencyCompanyCode());
ent.setAgentName(customer.getAgencyCompanyName()); ent.setAgentName(customer.getAgencyCompanyName());
if (Objects.isNull(ent.getId())) { ent.setServiceAgentCode(ent.getAgentCode());
ent.setServiceAgentCode(ent.getAgentCode()); ent.setServiceAgentName(ent.getAgentName());
ent.setServiceAgentName(ent.getAgentName());
}
} }
ent.setAddress(u.getSpecificAddress__c()); ent.setAddress(u.getSpecificAddress__c());
result.add(ent); result.add(ent);

View File

@ -232,7 +232,7 @@ public class AdminDeviceService {
ent.setWarrantyState(null); ent.setWarrantyState(null);
} }
// VUtils.trueThrow(true).throwMessage(STATE.SystemErr,"测试"); // VUtils.trueThrow(true).throwMessage(STATE.SystemErr,"测试");
if (Objects.nonNull(u.getAgent__r())) { if (Objects.isNull(ent.getId()) && Objects.nonNull(u.getAgent__r())) {
TBaseCustomer customer = agents.stream() TBaseCustomer customer = agents.stream()
.filter(agent -> agent.getAgencyCompanyCode().equals(u.getAgent__r().getId())) .filter(agent -> agent.getAgencyCompanyCode().equals(u.getAgent__r().getId()))
.findFirst() .findFirst()
@ -249,10 +249,8 @@ public class AdminDeviceService {
} }
ent.setAgentCode(customer.getAgencyCompanyCode()); ent.setAgentCode(customer.getAgencyCompanyCode());
ent.setAgentName(customer.getAgencyCompanyName()); ent.setAgentName(customer.getAgencyCompanyName());
if (Objects.isNull(ent.getId())) { ent.setServiceAgentCode(ent.getAgentCode());
ent.setServiceAgentCode(ent.getAgentCode()); ent.setServiceAgentName(ent.getAgentName());
ent.setServiceAgentName(ent.getAgentName());
}
} }
ent.setAddress(u.getSpecificAddress__c()); ent.setAddress(u.getSpecificAddress__c());
ent.setDataValidState(true); ent.setDataValidState(true);

View File

@ -12,7 +12,7 @@
LEFT JOIN t_base_device_type dt ON d.device_type=dt.device_type LEFT JOIN t_base_device_type dt ON d.device_type=dt.device_type
LEFT JOIN dictionary_item di ON d.warranty_state=di.id LEFT JOIN dictionary_item di ON d.warranty_state=di.id
LEFT JOIN t_base_part p ON t.component_id=p.id LEFT JOIN t_base_part p ON t.component_id=p.id
LEFT JOIN t_base_customer c ON c.agency_company_code=d.agent_code LEFT JOIN t_base_customer c ON c.agency_company_code=d.service_agent_code
<where> <where>
<if test="request.component!=null and request.component!=''"> <if test="request.component!=null and request.component!=''">
AND t.component=#{request.component} AND t.component=#{request.component}

View File

@ -12,7 +12,7 @@
LEFT JOIN gongfu_device_type dt ON d.device_type=dt.device_type LEFT JOIN gongfu_device_type dt ON d.device_type=dt.device_type
LEFT JOIN dictionary_item di ON d.warranty_state=di.id LEFT JOIN dictionary_item di ON d.warranty_state=di.id
LEFT JOIN gongfu_device_part p ON t.component_id=p.id LEFT JOIN gongfu_device_part p ON t.component_id=p.id
LEFT JOIN t_base_customer c ON c.agency_company_code=d.agent_code LEFT JOIN t_base_customer c ON c.agency_company_code=d.service_agent_code
<where> <where>
<if test="request.component!=null and request.component!=''"> <if test="request.component!=null and request.component!=''">
AND t.component=#{request.component} AND t.component=#{request.component}

View File

@ -7,7 +7,7 @@
"applyforId",if(da.create_by_id =#{userId} or da.handler_user_id = #{userId},1,0) AS usort,di.name as "typeDesc" "applyforId",if(da.create_by_id =#{userId} or da.handler_user_id = #{userId},1,0) AS usort,di.name as "typeDesc"
FROM gongfu_dispatch da FROM gongfu_dispatch da
LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no
LEFT JOIN t_base_customer bc ON dv.agent_code=bc.agency_company_code LEFT JOIN t_base_customer bc ON dv.service_agent_code=bc.agency_company_code
left join v_dispatch_applyfor af on da.id=af.ticket_id left join v_dispatch_applyfor af on da.id=af.ticket_id
left join gongfu_dispatch_applyfor af2 on da.id=af2.ticket_id and af2.audit_state=0 left join gongfu_dispatch_applyfor af2 on da.id=af2.ticket_id and af2.audit_state=0
left join dictionary_item di on da.type=di.id left join dictionary_item di on da.type=di.id
@ -53,7 +53,7 @@
, di2.name as "categoryDesc" , di2.name as "categoryDesc"
FROM gongfu_dispatch da FROM gongfu_dispatch da
LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no LEFT JOIN v_gongfu_device dv ON da.device_no=dv.device_no
LEFT JOIN t_base_customer bc ON dv.agent_code=bc.agency_company_code LEFT JOIN t_base_customer bc ON dv.service_agent_code=bc.agency_company_code
left join v_dispatch_applyfor af on da.id=af.ticket_id left join v_dispatch_applyfor af on da.id=af.ticket_id
left join dictionary_item di1 on da.type = di1.id left join dictionary_item di1 on da.type = di1.id
left join dictionary_item di2 on da.category = di2.id left join dictionary_item di2 on da.category = di2.id

View File

@ -142,7 +142,7 @@
LEFT JOIN v_device vd ON t.device_no=vd.device_no LEFT JOIN v_device vd ON t.device_no=vd.device_no
WHERE t.state!=4 WHERE t.state!=4
<if test="isPrimary==false"> <if test="isPrimary==false">
AND FIND_IN_SET(#{companyId},u.company_id) AND vd.agent_code=#{companyCode} AND FIND_IN_SET(#{companyId},u.company_id) AND vd.service_agent_code=#{companyCode}
</if> </if>
<if test="isPrimary==true"> <if test="isPrimary==true">
AND (u.id=#{userId} OR FIND_IN_SET(u.company_id,#{companyId})) AND (u.id=#{userId} OR FIND_IN_SET(u.company_id,#{companyId}))

View File

@ -146,7 +146,7 @@
LEFT JOIN v_all_device vd ON t.device_no=vd.device_no LEFT JOIN v_all_device vd ON t.device_no=vd.device_no
WHERE t.state!=4 WHERE t.state!=4
<if test="isPrimary!=null"> <if test="isPrimary!=null">
AND t.user_platform='app' and vd.agent_code in AND t.user_platform='app' and vd.service_agent_code in
<foreach collection="companyCodes" item="item" open="(" close=")" separator=","> <foreach collection="companyCodes" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>