forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
commit
aa8e404b5d
|
@ -4,6 +4,7 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
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.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
|
@ -26,6 +27,8 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||
@Autowired
|
||||
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||
@Autowired
|
||||
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||
|
@ -80,10 +83,23 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd = trafficSecurityWaybillRegistrationService.findById(pd); // 根据ID读取
|
||||
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("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.zcloud.controller.comprehensive;
|
|||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
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.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
@ -25,6 +27,11 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
|
||||
@Autowired
|
||||
private TrafficSecurityWaybillRegistrationService trafficSecurityWaybillRegistrationService;
|
||||
@Autowired
|
||||
private TrafficDrivingCommitmentService trafficDrivingCommitmentService;
|
||||
@Autowired
|
||||
private TrafficDrivingTypeService trafficDrivingTypeService;
|
||||
|
||||
@RequestMapping(value = "/listForSecurityWaybillre")
|
||||
@ResponseBody
|
||||
public Object listForSecurityWaybillRegistra(Page page) throws Exception {
|
||||
|
@ -64,6 +71,38 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
|
|||
map.put("result", errInfo);
|
||||
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")
|
||||
|
|
|
@ -26,6 +26,7 @@ public interface TrafficDrivingSignMapper {
|
|||
|
||||
List<PageData> listAllType(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param page
|
||||
|
|
|
@ -40,4 +40,11 @@ public interface TrafficDrivingTypeMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 获取检查记录详情
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData infoCategory(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> listForDrivingType(Page page);
|
||||
|
||||
|
|
|
@ -2,18 +2,25 @@ package com.zcloud.service.comprehensive.impl;
|
|||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingSignMapper;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingTypeMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService {
|
||||
|
||||
@Autowired
|
||||
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) {
|
||||
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
|
||||
DRIVINGTYPE_ID = #{DRIVINGTYPE_ID}
|
||||
</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>
|
||||
|
|
|
@ -158,10 +158,13 @@
|
|||
f.*,
|
||||
i.CORP_NAME,
|
||||
u.NAME,
|
||||
u.PHONE,
|
||||
b.LOCATIONNAME AS ORIGIN_NAME,
|
||||
b2.LOCATIONNAME AS DESTINATION_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
|
||||
<include refid="tableName"></include> f
|
||||
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_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_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'
|
||||
<if test="pd.WAYBILLSTATUS != null and pd.WAYBILLSTATUS != ''"><!-- 关键词检索-运单状态 -->
|
||||
and f.WAYBILLSTATUS = #{pd.WAYBILLSTATUS}
|
||||
|
@ -201,9 +206,21 @@
|
|||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
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
|
||||
<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
|
||||
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue