运单登记新增优化

地点管理优化
客户管理优化
dev
WenShiJun 2024-03-22 14:34:59 +08:00
parent 58494b827d
commit eb8c8d0129
11 changed files with 177 additions and 110 deletions

View File

@ -127,10 +127,18 @@ public class TrafficSafetyMeetingController extends BaseController {
if (start != null && end != null){ if (start != null && end != null){
Date startDate = DateUtil.fomatDate(start); Date startDate = DateUtil.fomatDate(start);
Date endDate = DateUtil.fomatDate(end); Date endDate = DateUtil.fomatDate(end);
if (date.after(startDate) && date.before(endDate)){
item.put("MEETING_STATUS",1); // 如果当前时间还没到startDate
}else if (date.after(endDate)){ if (date.before(startDate)) {
item.put("MEETING_STATUS",0); item.put("MEETING_STATUS", "0");
}
// 如果当前时间已经超过startDate且还没到endDate
else if (date.after(startDate) && date.before(endDate)) {
item.put("MEETING_STATUS", "1");
}
// 如果当前时间超过endDate
else if (date.after(endDate)) {
item.put("MEETING_STATUS", "2");
} }
String meetingDate = start + "至" + end; String meetingDate = start + "至" + end;
item.put("MEETING_DATE", meetingDate); item.put("MEETING_DATE", meetingDate);

View File

@ -39,6 +39,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
String customermanagement_id = this.get32UUID(); // 生成主键ID String customermanagement_id = this.get32UUID(); // 生成主键ID
pd.put("CUSTOMERMANAGEMENT_ID", customermanagement_id); // 设置客户管理ID pd.put("CUSTOMERMANAGEMENT_ID", customermanagement_id); // 设置客户管理ID
pd.put("CUSTOMERNAME_ID", this.get32UUID());
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 设置运输公司ID pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 设置运输公司ID
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 设置创建人ID pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 设置创建人ID
pd.put("CREATORNAME", Jurisdiction.getName()); // 设置创建人姓名 pd.put("CREATORNAME", Jurisdiction.getName()); // 设置创建人姓名
@ -52,6 +53,8 @@ public class TrafficSecurityCustomerManagementController extends BaseController
for (PageData contact : contacts) { for (PageData contact : contacts) {
PageData contactPd = new PageData(); PageData contactPd = new PageData();
contactPd.put("CUSTOMERCONTACT_ID", this.get32UUID()); contactPd.put("CUSTOMERCONTACT_ID", this.get32UUID());
contactPd.put("CONTACT_ID", this.get32UUID());
contactPd.put("CUSTOMERADDRESS_ID", this.get32UUID());
contactPd.put("CUSTOMERMANAGEMENT_ID", customermanagement_id); contactPd.put("CUSTOMERMANAGEMENT_ID", customermanagement_id);
contactPd.put("CREATOR", Jurisdiction.getUSER_ID()); // 设置创建人ID contactPd.put("CREATOR", Jurisdiction.getUSER_ID()); // 设置创建人ID
contactPd.put("CREATORNAME", Jurisdiction.getName()); // 设置创建人姓名 contactPd.put("CREATORNAME", Jurisdiction.getName()); // 设置创建人姓名

View File

@ -38,6 +38,8 @@ public class TrafficSecurityLocationManagementController extends BaseController
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名 pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
pd.put("LOCATIONMANAGEMENT_ID", locationmanagement_id); // 主键 pd.put("LOCATIONMANAGEMENT_ID", locationmanagement_id); // 主键
pd.put("LOCATIONNAME_ID", this.get32UUID());
pd.put("ADDRESSDETAILS_ID", this.get32UUID());
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间 pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
pd.put("ISDELETE", "0"); pd.put("ISDELETE", "0");

View File

@ -4,10 +4,7 @@ import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page; import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService; import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
import com.zcloud.util.Const; import com.zcloud.util.*;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -16,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -82,6 +80,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
pd.put("WAYBILLREGISTRATION_ID", waybillregistrationId); // 主键 pd.put("WAYBILLREGISTRATION_ID", waybillregistrationId); // 主键
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间 pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
pd.put("ISDELETE", "0"); pd.put("ISDELETE", "0");
Date shippingDate = DateUtil.fomatDate(pd.getString("SHIPPINGDATE")); Date shippingDate = DateUtil.fomatDate(pd.getString("SHIPPINGDATE"));
if (shippingDate != null && shippingDate.after(new Date())) { if (shippingDate != null && shippingDate.after(new Date())) {
pd.put("WAYBILLSTATUS", "1"); pd.put("WAYBILLSTATUS", "1");

View File

@ -32,7 +32,7 @@ public class InitPageDataUtil {
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人 pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除) pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put(PRIMARY_KEY, UuidUtil.get32UUID()); //是否删除(0:有效 1删除) pd.put(PRIMARY_KEY, UuidUtil.get32UUID());
} }
/** /**

View File

@ -26,6 +26,8 @@
f.CREATETIME, f.CREATETIME,
f.OPERATOR, f.OPERATOR,
f.OPERATORNAME, f.OPERATORNAME,
f.CONTACT_ID,
f.CUSTOMERADDRESS_ID,
f.OPERATTIME f.OPERATTIME
</sql> </sql>
@ -45,6 +47,8 @@
CREATETIME, CREATETIME,
OPERATOR, OPERATOR,
OPERATORNAME, OPERATORNAME,
CONTACT_ID,
CUSTOMERADDRESS_ID,
OPERATTIME OPERATTIME
</sql> </sql>
@ -64,6 +68,8 @@
#{CREATETIME}, #{CREATETIME},
#{OPERATOR}, #{OPERATOR},
#{OPERATORNAME}, #{OPERATORNAME},
#{CONTACT_ID},
#{CUSTOMERADDRESS_ID},
#{OPERATTIME} #{OPERATTIME}
</sql> </sql>

View File

@ -25,6 +25,7 @@
f.CREATETIME, f.CREATETIME,
f.OPERATOR, f.OPERATOR,
f.OPERATORNAME, f.OPERATORNAME,
f.CUSTOMERNAME_ID,
f.OPERATTIME f.OPERATTIME
</sql> </sql>
@ -43,6 +44,7 @@
CREATETIME, CREATETIME,
OPERATOR, OPERATOR,
OPERATORNAME, OPERATORNAME,
CUSTOMERNAME_ID,
OPERATTIME OPERATTIME
</sql> </sql>
@ -61,6 +63,7 @@
#{CREATETIME}, #{CREATETIME},
#{OPERATOR}, #{OPERATOR},
#{OPERATORNAME}, #{OPERATORNAME},
#{CUSTOMERNAME_ID},
#{OPERATTIME} #{OPERATTIME}
</sql> </sql>
@ -93,8 +96,10 @@
f.*, f.*,
i.CORP_NAME, i.CORP_NAME,
u.CONTACT, u.CONTACT,
u.CONTACT_ID,
u.CONTACTPHONE, u.CONTACTPHONE,
u.CUSTOMERADDRESS u.CUSTOMERADDRESS,
u.CUSTOMERADDRESS_ID
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID

View File

@ -29,6 +29,8 @@
f.OPERATORNAME, f.OPERATORNAME,
f.LONGITUDE, f.LONGITUDE,
f.LATITUDE, f.LATITUDE,
f.LOCATIONNAME_ID,
f.ADDRESSDETAILS_ID,
f.OPERATTIME f.OPERATTIME
</sql> </sql>
@ -51,6 +53,8 @@
OPERATORNAME, OPERATORNAME,
LONGITUDE, LONGITUDE,
LATITUDE, LATITUDE,
LOCATIONNAME_ID,
ADDRESSDETAILS_ID,
OPERATTIME OPERATTIME
</sql> </sql>
@ -73,6 +77,8 @@
#{OPERATORNAME}, #{OPERATORNAME},
#{LONGITUDE}, #{LONGITUDE},
#{LATITUDE}, #{LATITUDE},
#{LOCATIONNAME_ID},
#{ADDRESSDETAILS_ID},
#{OPERATTIME} #{OPERATTIME}
</sql> </sql>

View File

@ -159,13 +159,17 @@
i.CORP_NAME, i.CORP_NAME,
u.NAME, u.NAME,
b.LOCATIONNAME AS ORIGIN_NAME, b.LOCATIONNAME AS ORIGIN_NAME,
b2.LOCATIONNAME AS DESTINATION_NAME b2.LOCATIONNAME AS DESTINATION_NAME,
c.CUSTOMERNAME AS CLIENT_NAME,
c2.CUSTOMERNAME AS CONFIRMER_NAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
left join sys_user u on f.PRACTITIONER = u.USER_ID left join sys_user u on f.PRACTITIONER = u.USER_ID
left join bus_traffic_location_management b on f.ORIGIN = b.LOCATIONMANAGEMENT_ID left join bus_traffic_location_management b on f.ORIGIN = b.LOCATIONNAME_ID
left join bus_traffic_location_management b2 on f.DESTINATION = b2.LOCATIONMANAGEMENT_ID left join bus_traffic_location_management b2 on f.DESTINATION = b2.LOCATIONNAME_ID
left join bus_traffic_customer_management c on f.CLIENT = c.CUSTOMERNAME_ID
left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID
where f.ISDELETE = '0' where f.ISDELETE = '0'
<if test="pd.WAYBILLSTATUS != null and pd.WAYBILLSTATUS != ''"><!-- 关键词检索-运单状态 --> <if test="pd.WAYBILLSTATUS != null and pd.WAYBILLSTATUS != ''"><!-- 关键词检索-运单状态 -->
and f.WAYBILLSTATUS = #{pd.WAYBILLSTATUS} and f.WAYBILLSTATUS = #{pd.WAYBILLSTATUS}

View File

@ -10,58 +10,58 @@
<!-- 字段 --> <!-- 字段 -->
<sql id="Field"> <sql id="Field">
INSPECTANNUALLY_ID, INSPECTANNUALLY_ID,
CORPINFO_ID, CORPINFO_ID,
NUM, NUM,
VEHICLE_MODEL, VEHICLE_MODEL,
VEHICLE, VEHICLE,
CAR_OWNERS, CAR_OWNERS,
TELEPHONE, TELEPHONE,
REGISTRANT, REGISTRANT,
PROCESSING_DATE, PROCESSING_DATE,
ANNUAL_INSPECTION_CYCLE, ANNUAL_INSPECTION_CYCLE,
DUE_DATE, DUE_DATE,
INSPECTFEES, INSPECTFEES,
ACTUAL_COLLECTION, ACTUAL_COLLECTION,
ADDRESS, ADDRESS,
REMINDER_DAYS, REMINDER_DAYS,
REMINDER_DATE, REMINDER_DATE,
REMINDER_STATUS, REMINDER_STATUS,
INSPECTINFO, INSPECTINFO,
NOTES, NOTES,
ARCHIVES_TYPE, ARCHIVES_TYPE,
ISDELETE, ISDELETE,
CREATOR, CREATOR,
CREATORNAME, CREATORNAME,
CREATTIME CREATTIME
</sql> </sql>
<!-- 字段值 --> <!-- 字段值 -->
<sql id="FieldValue"> <sql id="FieldValue">
#{INSPECTANNUALLY_ID}, #{INSPECTANNUALLY_ID},
#{CORPINFO_ID}, #{CORPINFO_ID},
#{NUM}, #{NUM},
#{VEHICLE_MODEL}, #{VEHICLE_MODEL},
#{VEHICLE}, #{VEHICLE},
#{CAR_OWNERS}, #{CAR_OWNERS},
#{TELEPHONE}, #{TELEPHONE},
#{REGISTRANT}, #{REGISTRANT},
#{PROCESSING_DATE}, #{PROCESSING_DATE},
#{ANNUAL_INSPECTION_CYCLE}, #{ANNUAL_INSPECTION_CYCLE},
#{DUE_DATE}, #{DUE_DATE},
#{INSPECTFEES}, #{INSPECTFEES},
#{ACTUAL_COLLECTION}, #{ACTUAL_COLLECTION},
#{ADDRESS}, #{ADDRESS},
#{REMINDER_DAYS}, #{REMINDER_DAYS},
#{REMINDER_DATE}, #{REMINDER_DATE},
#{REMINDER_STATUS}, #{REMINDER_STATUS},
#{INSPECTINFO}, #{INSPECTINFO},
#{NOTES}, #{NOTES},
#{ARCHIVES_TYPE}, #{ARCHIVES_TYPE},
#{ISDELETE}, #{ISDELETE},
#{CREATOR}, #{CREATOR},
#{CREATORNAME}, #{CREATORNAME},
#{CREATTIME} #{CREATTIME}
</sql> </sql>
<!-- 新增--> <!-- 新增-->
@ -179,13 +179,13 @@ CREATTIME
--> -->
<select id="datalistPage" parameterType="page" resultType="pd"> <select id="datalistPage" parameterType="page" resultType="pd">
select select
b.NAME,
f.*, f.*,
case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE, case when f.DUE_DATE &lt; NOW() then 0 else 1 end as DUE_DATE_TYPE,
v1.PLATE_NUMBER, v1.PLATE_NUMBER
(SELECT sd.NAME FROM sys_dictionaries sd where sd.DICTIONARIES_ID=f.ANNUAL_INSPECTION_CYCLE) as ANNUAL_INSPECTION_CYCLE_NAME
from from
<include refid="tableName"></include> <include refid="tableName"></include> f
f left join sys_dictionaries b on f.ANNUAL_INSPECTION_CYCLE = b.DICTIONARIES_ID
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID INNER JOIN v_traffic v1 on f.VEHICLE=v1.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.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''"> <if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''">
@ -212,5 +212,4 @@ CREATTIME
ORDER BY f.CREATTIME DESC ORDER BY f.CREATTIME DESC
</select> </select>
</mapper> </mapper>

View File

@ -10,54 +10,89 @@
<!-- 字段 --> <!-- 字段 -->
<sql id="Field"> <sql id="Field">
OPERATIONS_ID, OPERATIONS_ID,
CORPINFO_ID, CORPINFO_ID,
NUM, INDUSTRY_TYPE,
VEHICLE_MODEL, INDUSTRY_TYPE_TREE,
VEHICLE, INDUSTRY_TYPE_NAMES,
CAR_OWNERS, OPER_CORP,
TELEPHONE, VEHICLE_MODEL,
REGISTRANT, VEHICLE,
PROCESSING_DATE, BASICINFO_LICENSE_PLATE,
CYCLE, BASICINFO_VIN,
DUE_DATE, BASICINFO_VEHICLETYPE,
REMINDER_DAYS, BASICINFO_CAR_OWNERS,
REMINDER_DATE, BASICINFO_CARPHONE,
REMINDER_STATUS, BASICINFO_INITIAL_REGISTRATION_DATE,
OPERATIONSINFO, BASICINFO_PROVINCE,
NOTES, BASICINFO_CITY,
ARCHIVES_TYPE, BASICINFO_COUNTY,
ISDELETE, CAR_OWNERS,
CREATOR, TELEPHONE,
CREATORNAME, REGISTRANT,
CREATTIME PROCESSING_DATE,
CYCLE,
DUE_DATE,
REMINDER_DAYS,
REMINDER_DATE,
REMINDER_STATUS,
OPERATIONSINFO,
NOTES,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETEOR,
DELETEORNAME,
DELETTIME
</sql> </sql>
<!-- 字段值 --> <!-- 字段值 -->
<sql id="FieldValue"> <sql id="FieldValue">
#{OPERATIONS_ID}, #{OPERATIONS_ID},
#{CORPINFO_ID}, #{CORPINFO_ID},
#{NUM}, #{INDUSTRY_TYPE},
#{VEHICLE_MODEL}, #{INDUSTRY_TYPE_TREE},
#{VEHICLE}, #{INDUSTRY_TYPE_NAMES},
#{CAR_OWNERS}, #{OPER_CORP},
#{TELEPHONE}, #{VEHICLE_MODEL},
#{REGISTRANT}, #{VEHICLE},
#{PROCESSING_DATE}, #{BASICINFO_LICENSE_PLATE},
#{CYCLE}, #{BASICINFO_VIN},
#{DUE_DATE}, #{BASICINFO_VEHICLETYPE},
#{REMINDER_DAYS}, #{BASICINFO_CAR_OWNERS},
#{REMINDER_DATE}, #{BASICINFO_CARPHONE},
#{REMINDER_STATUS}, #{BASICINFO_INITIAL_REGISTRATION_DATE},
#{OPERATIONSINFO}, #{BASICINFO_PROVINCE},
#{NOTES}, #{BASICINFO_CITY},
#{ARCHIVES_TYPE}, #{BASICINFO_COUNTY},
#{ISDELETE}, #{CAR_OWNERS},
#{CREATOR}, #{TELEPHONE},
#{CREATORNAME}, #{REGISTRANT},
#{CREATTIME} #{PROCESSING_DATE},
#{CYCLE},
#{DUE_DATE},
#{REMINDER_DAYS},
#{REMINDER_DATE},
#{REMINDER_STATUS},
#{OPERATIONSINFO},
#{NOTES},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETEOR},
#{DELETEORNAME},
#{DELETTIME}
</sql> </sql>
<!-- 新增--> <!-- 新增-->
<insert id="save" parameterType="pd"> <insert id="save" parameterType="pd">
insert into insert into