forked from integrated_whb/integrated_whb
parent
dfcd274dd1
commit
691cbf33c5
|
@ -6,7 +6,7 @@ import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.logs.LogAnno;
|
import com.zcloud.logs.LogAnno;
|
||||||
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -90,6 +90,11 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = trafficDrivingCommitmentService.listForDrivingCommitment(page);
|
List<PageData> varList = trafficDrivingCommitmentService.listForDrivingCommitment(page);
|
||||||
|
varList.stream().forEach(data -> {
|
||||||
|
if(StringUtils.equals(data.getString("INQUIRYCONCLUSION"), "正常")) {
|
||||||
|
data.put("INQUIRYCONCLUSION", "1");
|
||||||
|
}
|
||||||
|
});
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
|
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
|
||||||
import com.zcloud.service.comprehensive.TrafficSecurityNoticeService;
|
import com.zcloud.service.comprehensive.TrafficSecurityNoticeService;
|
||||||
|
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||||
import com.zcloud.util.Const;
|
import com.zcloud.util.Const;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
|
@ -34,6 +35,9 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrafficSecurityCustomerManagementService customerManagementService;
|
private TrafficSecurityCustomerManagementService customerManagementService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||||
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
@RequestMapping(value = "/add")
|
@RequestMapping(value = "/add")
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
|
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
|
||||||
import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService;
|
import com.zcloud.service.comprehensive.TrafficSecurityLocationManagementService;
|
||||||
|
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import com.zcloud.util.Tools;
|
import com.zcloud.util.Tools;
|
||||||
|
@ -28,6 +29,9 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrafficSecurityLocationManagementService locationManagementService;
|
private TrafficSecurityLocationManagementService locationManagementService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
@RequestMapping(value = "/add")
|
@RequestMapping(value = "/add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@ -91,6 +95,16 @@ public class TrafficSecurityLocationManagementController extends BaseController
|
||||||
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
pd.put("DELETORNAME", Jurisdiction.getUsername());//删除人姓名
|
||||||
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
pd.put("DELETETIME", DateUtil.date2Str(new Date()));//删除时间
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
|
/*PageData locationInfo = locationManagementService.getTrafficLocationInfo(pd);
|
||||||
|
PageData pageData = new PageData();
|
||||||
|
pageData.put("ORIGIN", locationInfo.getString("LOCATIONNAME_ID"));
|
||||||
|
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
|
List<PageData> pageDataList = trafficSecurityWaybillRegistrationService.getWaybillRegistrationInfo(pageData);
|
||||||
|
pageDataList.stream()
|
||||||
|
.forEach(data -> {
|
||||||
|
data.put("ORIGIN", "");
|
||||||
|
trafficSecurityWaybillRegistrationService.edit(data);
|
||||||
|
});*/
|
||||||
locationManagementService.delete(pd);
|
locationManagementService.delete(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -186,7 +186,9 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读
|
pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读=
|
||||||
|
pd.put("ENTRUST_PERSON", pd.getString("CLIENTCONTACTPERSON"));
|
||||||
|
pd.put("CONFIRM_PERSON", pd.getString("CONFIRMINGPERSON"));
|
||||||
List<String> dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList());
|
List<String> dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList());
|
||||||
List<PageData> names = new ArrayList<>();
|
List<PageData> names = new ArrayList<>();
|
||||||
dispatchers.forEach(data -> {
|
dispatchers.forEach(data -> {
|
||||||
|
@ -231,43 +233,10 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
|
|
||||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
||||||
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
pd.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||||
|
|
||||||
PageData pd2 = new PageData();
|
|
||||||
pd2.put("CONTACT", pd.getString("ENTRUST_PERSON"));
|
|
||||||
PageData contactInfo = trafficSecurityCustomerManagementService.findByContactName(pd2);
|
|
||||||
if (!ObjectUtil.isEmpty(contactInfo)) {
|
|
||||||
pd.put("ENTRUST_PERSON", contactInfo.getString("CONTACT_ID"));
|
|
||||||
if (!contactInfo.getString("CONTACTPHONE").equals(pd.getString("CLIENTCONTACTPHONE"))) {
|
|
||||||
PageData entrust = new PageData();
|
|
||||||
entrust.put("CONTACTPHONE", pd.getString("CLIENTCONTACTPHONE"));
|
|
||||||
entrust.put("CUSTOMERCONTACT_ID", contactInfo.getString("CUSTOMERCONTACT_ID"));
|
|
||||||
entrust.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
|
||||||
entrust.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
|
||||||
entrust.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
|
||||||
trafficSecurityCustomerManagementService.editContactPhone(entrust);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PageData pd3 = new PageData();
|
|
||||||
pd3.put("CONTACT", pd.getString("CONFIRM_PERSON"));
|
|
||||||
PageData pageData = trafficSecurityCustomerManagementService.findByContactName(pd3);
|
|
||||||
if (!ObjectUtil.isEmpty(pageData)) {
|
|
||||||
pd.put("CONFIRM_PERSON", pageData.getString("CONTACT_ID"));
|
|
||||||
if (!pd.getString("CONFIRMINGPHONE").equals(pageData.getString("CONTACTPHONE"))) {
|
|
||||||
PageData entrust = new PageData();
|
|
||||||
entrust.put("CONTACTPHONE", pd.getString("CONFIRMINGPHONE"));
|
|
||||||
entrust.put("CUSTOMERCONTACT_ID", pageData.getString("CUSTOMERCONTACT_ID"));
|
|
||||||
entrust.put("OPERATOR", Jurisdiction.getUSER_ID()); // 修改人id
|
|
||||||
entrust.put("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
|
||||||
entrust.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
|
||||||
trafficSecurityCustomerManagementService.editContactPhone(entrust);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
trafficSecurityWaybillRegistrationService.edit(pd);
|
trafficSecurityWaybillRegistrationService.edit(pd);
|
||||||
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -29,4 +29,6 @@ public interface TrafficSecurityWaybillRegistrationMapper {
|
||||||
PageData findById(PageData pd);
|
PageData findById(PageData pd);
|
||||||
|
|
||||||
void edit(PageData pd);
|
void edit(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> getWaybillRegistrationInfo(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,6 @@ public interface TrafficSecurityWaybillRegistrationService {
|
||||||
PageData findById(PageData pd);
|
PageData findById(PageData pd);
|
||||||
|
|
||||||
void edit(PageData pd);
|
void edit(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> getWaybillRegistrationInfo(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,4 +37,9 @@ public class TrafficSecurityWaybillRegistrationServiceImpl implements TrafficSec
|
||||||
public void edit(PageData pd) {
|
public void edit(PageData pd) {
|
||||||
TrafficSecurityWaybillRegistrationMapper.edit(pd);
|
TrafficSecurityWaybillRegistrationMapper.edit(pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> getWaybillRegistrationInfo(PageData pd) {
|
||||||
|
return TrafficSecurityWaybillRegistrationMapper.getWaybillRegistrationInfo(pd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
where
|
where
|
||||||
f.CONTACT = #{CONTACT}
|
f.CONTACT = #{CONTACT}
|
||||||
AND
|
AND
|
||||||
f.ISDELETE = 0
|
f.ISDELETE = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findByContactId" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
<select id="findByContactId" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||||
|
|
|
@ -123,8 +123,8 @@
|
||||||
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
|
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
|
||||||
left join bus_traffic_customer_contact u on f.CUSTOMERMANAGEMENT_ID = u.CUSTOMERMANAGEMENT_ID
|
left join bus_traffic_customer_contact u on f.CUSTOMERMANAGEMENT_ID = u.CUSTOMERMANAGEMENT_ID
|
||||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
<if test="pd.CUSTOMERTYPE != null and pd.CUSTOMERTYPE != ''"><!-- 关键词检索-客户类型 -->
|
<if test="pd.CUSTOMERNAME != null and pd.CUSTOMERNAME != ''"><!-- 关键词检索-客户类型 -->
|
||||||
and f.CUSTOMERTYPE = #{pd.CUSTOMERTYPE}
|
and f.CUSTOMERNAME LIKE CONCAT(CONCAT('%', #{pd.CUSTOMERNAME}),'%')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY u.CUSTOMERMANAGEMENT_ID
|
GROUP BY u.CUSTOMERMANAGEMENT_ID
|
||||||
ORDER BY f.OPERATTIME DESC
|
ORDER BY f.OPERATTIME DESC
|
||||||
|
|
|
@ -143,8 +143,8 @@
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
|
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
|
||||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
<if test="pd.LOCATIONTYPE != null and pd.LOCATIONTYPE != ''"><!-- 关键词检索-客户类型 -->
|
<if test="pd.LOCATIONNAME != null and pd.LOCATIONNAME != ''"><!-- 关键词检索-客户类型 -->
|
||||||
and f.LOCATIONTYPE = #{pd.LOCATIONTYPE}
|
and f.LOCATIONNAME LIKE CONCAT(CONCAT('%', #{pd.LOCATIONNAME}),'%')
|
||||||
</if>
|
</if>
|
||||||
ORDER BY f.OPERATTIME DESC
|
ORDER BY f.OPERATTIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -277,6 +277,19 @@
|
||||||
f.CORPINFO_ID = #{CORPINFO_ID}
|
f.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getWaybillRegistrationInfo" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
where f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
<if test="ORIGIN != null and ORIGIN != ''"><!-- 关键词检索-运单状态 -->
|
||||||
|
and f.ORIGIN = #{ORIGIN}
|
||||||
|
</if>
|
||||||
|
<if test="DESTINATION != null and DESTINATION != ''"><!-- 关键词检索-运单状态 -->
|
||||||
|
and f.DESTINATION = #{pd.DESTINATION}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue