forked from integrated_whb/integrated_whb
Compare commits
2 Commits
eb8c8d0129
...
b43cb8ecc1
Author | SHA1 | Date |
---|---|---|
chenxinying | b43cb8ecc1 | |
chenxinying | fb0e2acefb |
|
@ -4,6 +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.TrafficDrivingCommitmentService;
|
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService;
|
||||||
|
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
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;
|
||||||
|
@ -26,6 +27,8 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
||||||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||||
|
@Autowired
|
||||||
|
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||||
|
@ -80,10 +83,23 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd = trafficSecurityWaybillRegistrationService.findById(pd); // 根据ID读取
|
|
||||||
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||||
|
try {
|
||||||
|
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||||
|
// if(pd.getString("OPERATOR"))
|
||||||
|
// pd.put("a", "119.60436762");
|
||||||
|
// pd.put("b", "39.94546157");
|
||||||
|
errInfo = "success";
|
||||||
|
map.put("pd", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
map.put("msg", "数据获取成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
map.put("result", errInfo);
|
||||||
|
map.put("msg", "数据获取失败");
|
||||||
|
}
|
||||||
map.put("commitmentList", commitmentList);
|
map.put("commitmentList", commitmentList);
|
||||||
map.put("pd", pd);
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.zcloud.controller.comprehensive;
|
||||||
import com.zcloud.controller.base.BaseController;
|
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.TrafficDrivingCommitmentService;
|
||||||
|
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||||
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -25,6 +27,11 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||||
|
@Autowired
|
||||||
|
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||||
|
@Autowired
|
||||||
|
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||||
|
|
||||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object listForSecurityWaybillRegistra(Page page) throws Exception {
|
public Object listForSecurityWaybillRegistra(Page page) throws Exception {
|
||||||
|
@ -64,6 +71,38 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查看详情
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="/getDetail")
|
||||||
|
@ResponseBody
|
||||||
|
public Object goEdit() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = this.getPageData();
|
||||||
|
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
|
||||||
|
try {
|
||||||
|
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
|
||||||
|
// if(pd.getString("OPERATOR"))
|
||||||
|
// pd.put("a", "119.60436762");
|
||||||
|
// pd.put("b", "39.94546157");
|
||||||
|
errInfo = "success";
|
||||||
|
map.put("pd", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
map.put("msg", "数据获取成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
map.put("result", errInfo);
|
||||||
|
map.put("msg", "数据获取失败");
|
||||||
|
}
|
||||||
|
map.put("commitmentList", commitmentList);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
@RequestMapping(value = "/add")
|
@RequestMapping(value = "/add")
|
||||||
|
|
|
@ -26,6 +26,7 @@ public interface TrafficDrivingSignMapper {
|
||||||
|
|
||||||
List<PageData> listAllType(PageData pd);
|
List<PageData> listAllType(PageData pd);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
* @param page
|
* @param page
|
||||||
|
|
|
@ -40,4 +40,11 @@ public interface TrafficDrivingTypeMapper {
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
PageData findById(PageData pd);
|
PageData findById(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> findCategory(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> findListbyDetail(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> findListbyItem(PageData pd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,12 @@ public interface TrafficDrivingTypeService {
|
||||||
*/
|
*/
|
||||||
public void edit(PageData pd)throws Exception;
|
public void edit(PageData pd)throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查记录详情
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public PageData infoCategory(PageData pd) throws Exception;
|
||||||
|
|
||||||
List<PageData> listForDrivingType(Page page);
|
List<PageData> listForDrivingType(Page page);
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,25 @@ package com.zcloud.service.comprehensive.impl;
|
||||||
|
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingSignMapper;
|
||||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingTypeMapper;
|
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingTypeMapper;
|
||||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService {
|
public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrafficDrivingTypeMapper trafficDrivingTypeMapper;
|
private TrafficDrivingTypeMapper trafficDrivingTypeMapper;
|
||||||
|
@Autowired
|
||||||
|
private com.zcloud.mapper.datasource.comprehensive.TrafficSecurityWaybillRegistrationMapper TrafficSecurityWaybillRegistrationMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**新增
|
/**新增
|
||||||
|
@ -55,4 +62,40 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
|
||||||
public PageData findById(PageData pd) {
|
public PageData findById(PageData pd) {
|
||||||
return trafficDrivingTypeMapper.findById(pd);
|
return trafficDrivingTypeMapper.findById(pd);
|
||||||
}
|
}
|
||||||
|
@Autowired
|
||||||
|
private TrafficDrivingSignMapper trafficDrivingSignMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取检查记录详情
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public PageData infoCategory(PageData pd)throws Exception{
|
||||||
|
PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取
|
||||||
|
List<PageData> varOList = trafficDrivingTypeMapper.findListbyDetail(pd);
|
||||||
|
List<PageData> vList = trafficDrivingTypeMapper.findCategory(pd);
|
||||||
|
List<PageData> varItemList = trafficDrivingTypeMapper.findListbyItem(pd);
|
||||||
|
|
||||||
|
List<PageData> pd1Children = new ArrayList<>();
|
||||||
|
List<PageData> pd2Children = new ArrayList<>();
|
||||||
|
for (PageData pd1: vList) {
|
||||||
|
pd1Children = new ArrayList<>();
|
||||||
|
for (PageData pd2:varOList) {
|
||||||
|
pd2Children = new ArrayList<>();
|
||||||
|
if (pd1.getString("CHECKTYPE_ID").equals(pd2.getString("CHECKTYPE_ID"))) {
|
||||||
|
for (PageData pd3:varItemList) {
|
||||||
|
if (pd2.getString("DRIVING_SIGN_ID").equals(pd3.getString("DRIVING_SIGN_ID"))) {
|
||||||
|
pd2Children.add(pd3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pd2.put("pd2Children",pd2Children);
|
||||||
|
pd1Children.add(pd2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pd1.put("pd1Children",pd1Children);
|
||||||
|
}
|
||||||
|
|
||||||
|
cpd.put("varList", vList);
|
||||||
|
return cpd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,4 +133,55 @@
|
||||||
where
|
where
|
||||||
DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
|
DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="findCategory" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
f.CHECKTYPE_ID,
|
||||||
|
d.NAME as CHECKTYPE_NAME
|
||||||
|
from
|
||||||
|
bus_traffic_driving_sign f
|
||||||
|
left join sys_dictionaries d on d.BIANMA = f.CHECKTYPE_ID
|
||||||
|
where f.ISDELETE = '0'
|
||||||
|
AND f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||||
|
group by f.CHECKTYPE_ID
|
||||||
|
order by f.CHECKTYPE_ID,f.OPERATTIME
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findListbyDetail" parameterType="pd" resultType="pd">
|
||||||
|
<!-- select f.DRIVINGTYPE_ID,f.CHECKITEMNAME,f.REMARKS,u.NAME,-->
|
||||||
|
<!-- f.CHECKTYPE_ID,s.SIGN_TIME,s.SIGN_PATH,s.IMG_PATH,-->
|
||||||
|
<!-- s.WAYBILLREGISTRATION_ID,i.STATUS,i.REMARK-->
|
||||||
|
<!-- from-->
|
||||||
|
<!-- <include refid="tableName"></include> f-->
|
||||||
|
<!-- left join bus_traffic_driving_item i on i.DRIVINGTYPE_ID = f.DRIVINGTYPE_ID-->
|
||||||
|
<!-- left join bus_traffic_driving_sign s on s.DRIVING_SIGN_ID = i.DRIVING_SIGN_ID-->
|
||||||
|
<!-- left join sys_user u on u.USER_ID = s.CREATOR-->
|
||||||
|
<!-- left join sys_dictionaries d on d.BIANMA = f.CHECKTYPE_ID-->
|
||||||
|
<!-- where f.ISDELETE = '0'-->
|
||||||
|
<!-- and s.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID} order by s.OPERATTIME-->
|
||||||
|
SELECT
|
||||||
|
f.*
|
||||||
|
FROM
|
||||||
|
bus_traffic_driving_sign f
|
||||||
|
WHERE
|
||||||
|
f.ISDELETE = '0'
|
||||||
|
AND f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||||
|
ORDER BY
|
||||||
|
f.OPERATTIME
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findListbyItem" parameterType="pd" resultType="pd">
|
||||||
|
SELECT
|
||||||
|
f.*,t.CHECKITEMNAME,t.REMARKS
|
||||||
|
FROM
|
||||||
|
bus_traffic_driving_item f
|
||||||
|
left join bus_traffic_driving_sign s on s.DRIVING_SIGN_ID = f.DRIVING_SIGN_ID
|
||||||
|
left join bus_traffic_driving_type t on t.DRIVINGTYPE_ID = f.DRIVINGTYPE_ID
|
||||||
|
WHERE
|
||||||
|
f.ISDELETE = '0'
|
||||||
|
AND s.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||||
|
ORDER BY
|
||||||
|
f.OPERATTIME;
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -158,10 +158,13 @@
|
||||||
f.*,
|
f.*,
|
||||||
i.CORP_NAME,
|
i.CORP_NAME,
|
||||||
u.NAME,
|
u.NAME,
|
||||||
|
u.PHONE,
|
||||||
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,
|
c.CUSTOMERNAME AS CLIENT_NAME,
|
||||||
c2.CUSTOMERNAME AS CONFIRMER_NAME
|
c2.CUSTOMERNAME AS CONFIRMER_NAME,
|
||||||
|
t.OPERATTIME as STARTTIME,
|
||||||
|
p.OPERATTIME as STOPTIME
|
||||||
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
|
||||||
|
@ -170,6 +173,8 @@
|
||||||
left join bus_traffic_location_management b2 on f.DESTINATION = b2.LOCATIONNAME_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 c on f.CLIENT = c.CUSTOMERNAME_ID
|
||||||
left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID
|
left join bus_traffic_customer_management c2 on f.CONFIRMER = c2.CUSTOMERNAME_ID
|
||||||
|
left join bus_traffic_driving_sign t on t.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and t.CHECKTYPE_ID = 'status001'
|
||||||
|
left join bus_traffic_driving_sign p on p.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and p.CHECKTYPE_ID = 'status003'
|
||||||
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}
|
||||||
|
@ -201,9 +206,21 @@
|
||||||
|
|
||||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>,
|
||||||
|
s.NAME as USERNAME,
|
||||||
|
s.PHONE,
|
||||||
|
t.OPERATTIME as STARTTIME,
|
||||||
|
p.OPERATTIME as STOPTIME,
|
||||||
|
c.PLATE_NUMBER,
|
||||||
|
c.APPROVED_TOTAL_MASS,
|
||||||
|
c.APPROVED_LOAD_CAPACITY,
|
||||||
|
c.VIN
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
|
left join sys_user s on s.USER_ID = f.PRACTITIONER
|
||||||
|
left join bus_traffic_driving_sign t on t.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and t.CHECKTYPE_ID = 'status001'
|
||||||
|
left join bus_traffic_driving_sign p on p.WAYBILLREGISTRATION_ID = f.WAYBILLREGISTRATION_ID and p.CHECKTYPE_ID = 'status003'
|
||||||
|
left join bus_traffic_mechanical_freighttrailer c on c.FREIGHTTRAILER_ID = f.TRUCKCART
|
||||||
where
|
where
|
||||||
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue