forked from integrated_whb/integrated_whb
BUG优化
parent
56e76848cc
commit
41336d567c
|
@ -16,10 +16,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/assignedmanage")
|
||||
|
@ -149,10 +146,13 @@ public class AssignedManageController extends BaseController {
|
|||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = assignedManageService.list(page); //列出MajorDangerSource列表
|
||||
List<PageData> vehicleList = new ArrayList<>();
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -75,7 +75,8 @@ public class FreighttTrailerController extends BaseController {
|
|||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
|
||||
|
||||
pd.put("ISSCRAP", "0");
|
||||
pd.put("ISASSIGNED", "0");
|
||||
freightTrailerService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -55,6 +55,7 @@ public class ScrapManageController extends BaseController {
|
|||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
freightTrailerService.editScrapStatus(pd);
|
||||
scrapManageService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
@ -84,6 +85,13 @@ public class ScrapManageController extends BaseController {
|
|||
PageData scrapVehicle = operatingVehiclesService.findByfindByPlateNumber(pd2);
|
||||
scrapVehicle.put("ISSCRAP", "0");
|
||||
operatingVehiclesService.edit(scrapVehicle);
|
||||
}else{
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));
|
||||
pd2.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));
|
||||
PageData scrapVehicle = freightTrailerService.findByPlateNumber(pd2);
|
||||
scrapVehicle.put("ISSCRAP", "0");
|
||||
freightTrailerService.edit(scrapVehicle);
|
||||
}
|
||||
scrapManageService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
|
@ -192,7 +200,7 @@ public class ScrapManageController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getscrapfreighttrailerlist")
|
||||
/*@RequestMapping(value = "/getscrapfreighttrailerlist")
|
||||
@ResponseBody
|
||||
public Object getScrapFreightTrailerList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
@ -210,6 +218,18 @@ public class ScrapManageController extends BaseController {
|
|||
map.put("varList", freightList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}*/
|
||||
|
||||
@RequestMapping(value = "/getscrapfreighttrailerlist")
|
||||
@ResponseBody
|
||||
public Object getScrapFreightTrailerList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
List<PageData> freightList = freightTrailerService.trailerList(corpId);
|
||||
map.put("varList", freightList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ public class TaxationManageController extends BaseController {
|
|||
List<PageData> taxationList = taxationManageService.list(page); // 列出车船税列表
|
||||
for (int i = 0; i < taxationList.size(); i++) {
|
||||
for (int j = 0; j < varList.size(); j++) {
|
||||
if(taxationList.get(i).get("PLATE_NUMBER").equals(varList.get(j).get("PLATE_NUMBER"))){
|
||||
if (taxationList.get(i).get("PLATE_NUMBER").equals(varList.get(j).get("PLATE_NUMBER")) || varList.get(j).get("ISSCRAP").equals("1")) {
|
||||
varList.remove(j);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,5 +78,9 @@ public interface FreightTrailerMapper {
|
|||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
void editScrapStatus(PageData pd);
|
||||
|
||||
PageData findByPlateNumber(PageData pd2);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public interface OperationsMapper {
|
|||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
List<PageData> datalistPage2(Page page);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -78,5 +78,9 @@ public interface FreightTrailerService {
|
|||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
void editScrapStatus(PageData pd);
|
||||
|
||||
PageData findByPlateNumber(PageData pd2);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,5 +113,14 @@ public class FreightTrailerServiceImpl implements FreightTrailerService {
|
|||
return freightTrailerMapper.listAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editScrapStatus(PageData pd) {
|
||||
freightTrailerMapper.editScrapStatus(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findByPlateNumber(PageData pd2) {
|
||||
return freightTrailerMapper.findByPlateNumber(pd2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public class OperationsServiceImpl implements OperationsService {
|
|||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page) throws Exception {
|
||||
return operationsMapper.datalistPage(page);
|
||||
return operationsMapper.datalistPage2(page);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -423,10 +423,10 @@
|
|||
<!-- 列表(全部) -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.ASSIGNED_TYPE != null and pd.ASSIGNED_TYPE != ''"><!-- 关键词检索 -->
|
||||
and f.ASSIGNED_TYPE = #{pd.ASSIGNED_TYPE}
|
||||
</if>
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATTIME,
|
||||
ISDELETE
|
||||
ISDELETE,
|
||||
ISSCRAP,
|
||||
ISASSIGNED
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -73,7 +75,9 @@
|
|||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATTIME},
|
||||
#{ISDELETE}
|
||||
#{ISDELETE},
|
||||
#{ISSCRAP},
|
||||
#{ISASSIGNED}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
@ -95,7 +99,8 @@
|
|||
ISDELETE = '1',
|
||||
DELETEOR = #{DELETEOR},
|
||||
DELETEORNAME = #{DELETEORNAME},
|
||||
DELETTIME = #{DELETTIME}
|
||||
DELETTIME = #{DELETTIME},
|
||||
ISSCRAP = '1'
|
||||
where
|
||||
FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID}
|
||||
</delete>
|
||||
|
@ -130,7 +135,9 @@
|
|||
OPER_CERTIFICATE_IMG = #{OPER_CERTIFICATE_IMG},
|
||||
TRAILER_INFO = #{TRAILER_INFO},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISSCRAP = #{ISSCRAP},
|
||||
ISASSIGNED = #{ISASSIGNED}
|
||||
where
|
||||
FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID}
|
||||
</update>
|
||||
|
@ -222,7 +229,7 @@
|
|||
*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId}
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId} AND f.ISSCRAP = '0'
|
||||
</select>
|
||||
|
||||
<!-- 货运挂车列表ALL -->
|
||||
|
@ -259,4 +266,24 @@
|
|||
where f.ISDELETE = '0'
|
||||
</select>
|
||||
|
||||
<update id="editScrapStatus" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISSCRAP = '1'
|
||||
where
|
||||
FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID}
|
||||
and
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
</update>
|
||||
|
||||
<select id="findByPlateNumber" parameterType="pd" resultType="pd">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID} and f.PLATE_NUMBER = #{PLATE_NUMBER}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -221,20 +221,14 @@
|
|||
select
|
||||
f.*,
|
||||
case when f.DUE_DATE < NOW() then 0 else 1 end as DUE_DATE_TYPE,
|
||||
v1.PLATE_NUMBER,
|
||||
case
|
||||
when btsm.PLATE_NUMBER is not null then '1'
|
||||
when bta.RAW_PLATE_NUMBER is not null then '2'
|
||||
else f.ARCHIVES_TYPE
|
||||
end as NEW_ARCHIVES_TYPE,
|
||||
COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER
|
||||
v1.PLATE_NUMBER
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
|
||||
LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER
|
||||
LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
INNER JOIN v_traffic v1 on f.VEHICLE = v1.ID
|
||||
LEFT JOIN BUS_TRAFFIC_OPERATINGVEHICLE o on o.OPERATING_ID = f.VEHICLE
|
||||
LEFT JOIN BUS_TRAFFIC_MECHANICAL_FREIGHTTRAILER btmf on btmf.FREIGHTTRAILER_ID = f.VEHICLE
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} AND (o.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
|
||||
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
|
||||
</if>
|
||||
|
|
|
@ -257,4 +257,52 @@
|
|||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<select id="datalistPage2" parameterType="page" resultType="pd">
|
||||
select
|
||||
b.NAME,
|
||||
f.*,
|
||||
case when f.DUE_DATE < NOW() then 0 else 1 end as DUE_DATE_TYPE,
|
||||
v1.PLATE_NUMBER,
|
||||
v1.TRAFFIC_TYPE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join sys_dictionaries b on b.DICTIONARIES_ID=f.CYCLE AND b.PARENT_ID='8b7dea3977fd4360a3cc8112368b90ff'
|
||||
INNER JOIN v_traffic v1 on f.VEHICLE = v1.ID
|
||||
LEFT JOIN BUS_TRAFFIC_OPERATINGVEHICLE o on o.OPERATING_ID = f.VEHICLE
|
||||
LEFT JOIN BUS_TRAFFIC_MECHANICAL_FREIGHTTRAILER btmf on btmf.FREIGHTTRAILER_ID = f.VEHICLE
|
||||
WHERE f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} AND (o.ISSCRAP = '0' OR btmf.ISSCRAP = '0')
|
||||
<if test="pd.BASICINFO_LICENSE_PLATE != null and pd.BASICINFO_LICENSE_PLATE != ''">
|
||||
and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%')
|
||||
</if>
|
||||
<if test="pd.CAR_OWNERS != null and pd.CAR_OWNERS != ''">
|
||||
and f.CAR_OWNERS LIKE CONCAT(CONCAT('%', #{pd.CAR_OWNERS}),'%')
|
||||
</if>
|
||||
<if test="pd.REGISTRANT != null and pd.REGISTRANT != ''">
|
||||
and f.REGISTRANT LIKE CONCAT(CONCAT('%', #{pd.REGISTRANT}),'%')
|
||||
</if>
|
||||
<if test="pd.DUE_DATE != null and pd.DUE_DATE != ''">
|
||||
and f.DUE_DATE = #{pd.DUE_DATE}
|
||||
</if>
|
||||
<if test="pd.VEHICLE_MODEL != null and pd.VEHICLE_MODEL != ''">
|
||||
and f.VEHICLE_MODEL LIKE CONCAT(CONCAT('%', #{pd.VEHICLE_MODEL}),'%')
|
||||
</if>
|
||||
<if test="pd.REMINDER_STATUS != null and pd.REMINDER_STATUS != ''">
|
||||
and f.REMINDER_STATUS = #{pd.REMINDER_STATUS}
|
||||
</if>
|
||||
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''">
|
||||
and v1.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')
|
||||
</if>
|
||||
<if test="pd.DUE_DATE_TYPE != null and pd.DUE_DATE_TYPE != ''">
|
||||
-- 添加条件:只有当当前时间(NOW())处于提醒时间段内时,才会返回相应的记录。
|
||||
-- 提醒时间段是由两个日期定义的:
|
||||
-- 1. 提前提醒的日期,即从DUE_DATE字段指定的到期日期减去REMINDER_DAYS字段指定的天数。
|
||||
-- 2. 到期日期(DUE_DATE字段)本身。
|
||||
-- DATE_SUB函数用于计算提前提醒的日期。它从到期日期中减去一定天数,以得到提醒开始的日期。
|
||||
-- DATE_SUB的第一个参数是到期日期(f.DUE_DATE),
|
||||
-- 第二个参数INTERVAL f.REMINDER_DAYS DAY指定从到期日期向前推算的天数(f.REMINDER_DAYS字段的值)
|
||||
and NOW() BETWEEN DATE_SUB(f.DUE_DATE, INTERVAL f.REMINDER_DAYS DAY) AND f.DUE_DATE
|
||||
</if>
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -184,7 +184,8 @@
|
|||
OPERATTIME = #{OPERATTIME},
|
||||
DELETOR = #{DELETOR},
|
||||
DELETORNAME = #{DELETORNAME},
|
||||
DELETTIME =#{DELETTIME},
|
||||
DELETTIME =#{DELETTIME}
|
||||
SCRAPFLAG =#{SCRAPFLAG}
|
||||
where
|
||||
SCRAP_ID = #{SCRAP_ID}
|
||||
</update>
|
||||
|
|
|
@ -403,17 +403,11 @@
|
|||
<!-- 列表(全部) -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
SELECT
|
||||
f.*,
|
||||
CASE
|
||||
WHEN btsm.PLATE_NUMBER IS NOT NULL THEN '1'
|
||||
WHEN bta.RAW_PLATE_NUMBER IS NOT NULL THEN '2'
|
||||
ELSE '0'
|
||||
END AS NEW_ARCHIVES_TYPE
|
||||
f.*
|
||||
FROM
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm ON f.PLATE_NUMBER = btsm.PLATE_NUMBER
|
||||
LEFT JOIN BUS_TRAFFIC_ASSIGNED bta ON f.PLATE_NUMBER = bta.RAW_PLATE_NUMBER
|
||||
WHERE f.ISDELETE = '0'
|
||||
LEFT JOIN BUS_TRAFFIC_MECHANICAL_FREIGHTTRAILER btmf on btmf.FREIGHTTRAILER_ID = f.FREIGHTTRAILER_ID
|
||||
WHERE f.ISDELETE = '0' AND btmf.ISSCRAP = '0'
|
||||
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''">
|
||||
AND f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}), '%')
|
||||
</if>
|
||||
|
|
Loading…
Reference in New Issue