优化BUG

dev
xiepeng 2024-05-15 18:08:03 +08:00
parent f9097fe38a
commit 0de1e045c0
11 changed files with 96 additions and 16 deletions

View File

@ -113,6 +113,9 @@ public class EmergencyPlanController extends BaseController {
smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile); smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
pd.put("PLAN_ATTACH_NAME", file.getOriginalFilename()); pd.put("PLAN_ATTACH_NAME", file.getOriginalFilename());
pd.put("PLAN_ATTACH_IDS", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); pd.put("PLAN_ATTACH_IDS", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
}else{
pd.put("PLAN_ATTACH_NAME", null);
pd.put("PLAN_ATTACH_IDS", null);
} }
emergencyplanService.edit(pd); emergencyplanService.edit(pd);
map.put("result", errInfo); map.put("result", errInfo);

View File

@ -3,6 +3,7 @@ package com.zcloud.controller.freighttrailer;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor;
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;
@ -574,14 +575,15 @@ public class FreighttTrailerController extends BaseController {
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) { if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
// 营运车辆 // 营运车辆
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID")); List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
operatingList = operatingList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList());
page.setPd(pd); page.setPd(pd);
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page); List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
// 获取所有的营运车辆 // 获取所有的营运车辆
List<PageData> operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL"))) List<PageData> operatings = insAnnually.stream().filter(data -> StringUtils.equals("1", data.getString("VEHICLE_MODEL")))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 过滤掉年检车辆中已经存在的营运车辆 // 过滤掉年检车辆中已经存在的营运车辆
List<PageData> varList = new ArrayList<>(); List<PageData> varList = new ArrayList<>();
if(!CollectionUtils.isEmpty(operatings)) { if(!CollectionUtils.isEmpty(operatings)) {
@ -609,6 +611,7 @@ public class FreighttTrailerController extends BaseController {
if("2".equals(pd.getString("TRAFFIC_TYPE"))) { if("2".equals(pd.getString("TRAFFIC_TYPE"))) {
// 货运挂车 // 货运挂车
List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID")); List<PageData> freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID"));
freightList = freightList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList());
page.setPd(pd); page.setPd(pd);
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page); List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
@ -660,4 +663,19 @@ public class FreighttTrailerController extends BaseController {
return map; return map;
} }
@RequestMapping(value = "/findTrailerByPlateNumber")
@ResponseBody
public Object findTrailerByPlateNumber() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("PLATE_NUMBER", pd.getString("vehicleNumber"));
PageData resData = freightTrailerService.findTrailerByPlateNumber(pd);
map.put("pd", resData);
map.put("result", errInfo);
return map;
}
} }

View File

@ -121,6 +121,10 @@ public class InsureController extends BaseController {
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())); //修改时间
pd.put("operating","1");
pd.put("operating",')');
pd.put("isasscined","1");
if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(), pd.getString("REMINDER_DATE"))) { if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(), pd.getString("REMINDER_DATE"))) {
pd.put("REVERT", 2); pd.put("REVERT", 2);
} else if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("DUE_DATE"))) { } else if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("DUE_DATE"))) {

View File

@ -73,6 +73,7 @@ public class OperatingVehiclesController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("NETWORK_STATUS", "未入网"); pd.put("NETWORK_STATUS", "未入网");
pd.put("ISSCRAP", "0"); pd.put("ISSCRAP", "0");
pd.put("ISASSIGNED", "0");
operatingVehiclesService.save(pd); operatingVehiclesService.save(pd);
map.put("pd", pd); map.put("pd", pd);
map.put("result", errInfo); map.put("result", errInfo);

View File

@ -243,6 +243,7 @@ public class UsersController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
//page.setPd(pd); //page.setPd(pd);
List<PageData> userList = usersService.userSelectPersonTypelist(pd);//列出用户列表 List<PageData> userList = usersService.userSelectPersonTypelist(pd);//列出用户列表
System.out.println("userList = " + userList);
map.put("userList", userList); map.put("userList", userList);
//map.put("page", page); //map.put("page", page);
map.put("pd", pd); map.put("pd", pd);

View File

@ -92,5 +92,7 @@ public interface FreightTrailerMapper {
List<PageData> getScrapPulldownVehicleList(String corpId); List<PageData> getScrapPulldownVehicleList(String corpId);
void editInspectTreight(PageData pd); void editInspectTreight(PageData pd);
PageData findTrailerByPlateNumber(PageData pd);
} }

View File

@ -92,5 +92,7 @@ public interface FreightTrailerService {
List<PageData> getScrapPulldownVehicleList(String corpId); List<PageData> getScrapPulldownVehicleList(String corpId);
void editInspectTreight(PageData data); void editInspectTreight(PageData data);
PageData findTrailerByPlateNumber(PageData pd);
} }

View File

@ -147,5 +147,10 @@ public class FreightTrailerServiceImpl implements FreightTrailerService {
public void editInspectTreight(PageData pd) { public void editInspectTreight(PageData pd) {
freightTrailerMapper.editInspectTreight(pd); freightTrailerMapper.editInspectTreight(pd);
} }
@Override
public PageData findTrailerByPlateNumber(PageData pd) {
return freightTrailerMapper.findTrailerByPlateNumber(pd);
}
} }

View File

@ -428,5 +428,16 @@
f.ISDELETE = '0' AND f.CORPINFO_ID = #{corpId} AND f.ISASSIGNED = '0' f.ISDELETE = '0' AND f.CORPINFO_ID = #{corpId} AND f.ISASSIGNED = '0'
</select> </select>
<select id="findTrailerByPlateNumber" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.PLATE_NUMBER = #{PLATE_NUMBER} AND
f.CORPINFO_ID = #{CORPINFO_ID}
AND f.ISDELETE = '0'
</select>
</mapper> </mapper>

View File

@ -355,6 +355,7 @@
where where
f.PLATE_NUMBER = #{PLATE_NUMBER} AND f.PLATE_NUMBER = #{PLATE_NUMBER} AND
f.CORPINFO_ID = #{CORPINFO_ID} f.CORPINFO_ID = #{CORPINFO_ID}
AND f.ISDELETE = '0'
</select> </select>
<select id="listAll" resultType="com.zcloud.entity.PageData"> <select id="listAll" resultType="com.zcloud.entity.PageData">
@ -567,7 +568,7 @@
dep.NAME AS DEPARTMENTNAME dep.NAME AS DEPARTMENTNAME
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
inner join oa_department dep on dep.DEPARTMENT_ID = f.BELONGING_DEPARTMENT left join oa_department dep on dep.DEPARTMENT_ID = f.BELONGING_DEPARTMENT
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 != ''"><!-- 关键词检索 -->
and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%')

View File

@ -1629,29 +1629,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="userSelectPersonTypelist" resultType="com.zcloud.entity.PageData"> <select id="userSelectPersonTypelist" resultType="com.zcloud.entity.PageData">
select select u.USER_ID,
u.USER_ID,
u.USERNAME, u.USERNAME,
u.PASSWORD, u.PASSWORD,
u.LAST_LOGIN, u.LAST_LOGIN,
u.NAME, u.NAME,
u.SEX,
u.IP, u.IP,
u.EMAIL, u.EMAIL,
u.NUMBER, u.NUMBER,
u.PHONE, u.PHONE,
u.ISMAIN, u.ISMAIN,
u.PUSH_CID, u.SHIFTDUTYONE,
r.PERSONNEL_TYPE u.SHIFTDUTYTWO,
u.DURATION,
u.WORKSTATUS,
u.WORKPERIOD,
u.CORPINFO_ID,
u.DEPARTMENT_ID,
u.POST_ID,
u.SORT,
r.ROLE_ID,
r.ROLE_NAME,
d.NAME as DEPARTMENT_NAME,
p.NAME AS POST_NAME,
sw.NAME SHIFTDUTYONENAME,
swr.NAME SHIFTDUTYTWONAME,
info.IS_RECORDER,
info.IS_CHARGE
,info.USER_ID_CARD
,info.CERTIFICATETYPE
,info.DEGREE_OF_EDUCATION
,info.PERSONNEL_TYPE
,info.DUTIES
,info.TITLE
,info.ENTRY_DATE
<!-- ,dic.`NAME` as PERSONNEL_TYPE_NAME -->
,(SELECT GROUP_CONCAT(dic.NAME SEPARATOR ',') from SYS_DICTIONARIES dic
where dic.PARENT_ID = '0b62f92b0b624aab8e89a77304a64d5e'
and dic.BIANMA like '%TRAFFIC_EMPLOYMENT_DRIVE%'
and FIND_IN_SET(dic.DICTIONARIES_ID,info.PERSONNEL_TYPE)) as PERSONNEL_TYPE_NAME
,uc.USER_CORP_ID
,uc.APPLY_TYPE
,uc.APPLY_STATUS
from <include refid="tableName"></include> u from <include refid="tableName"></include> u
left join sys_userinfo r on u.USER_ID = r.USER_ID left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
left join sys_dictionaries d on r.PERSONNEL_TYPE = d.DICTIONARIES_ID left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
where left join SYS_POST p on p.POST_ID=u.POST_ID
u.ISDELETE = 0 left join BUS_SHIFTWORKRULES sw on sw.SHIFTWORKRULES_ID = u.SHIFTDUTYONE
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> left join BUS_SHIFTWORKRULES swr on swr.SHIFTWORKRULES_ID = u.SHIFTDUTYTWO
AND u.CORPINFO_ID = #{CORPINFO_ID} left join SYS_USERINFO info on info.USER_ID = u.USER_ID
</if> <!-- left join SYS_DICTIONARIES dic on dic.DICTIONARIES_ID = info.PERSONNEL_TYPE -->
and d.DICTIONARIES_ID = '5ae743c76dbf496eb1b5101075b073d5' left join (
SELECT t1.USER_CORP_ID, t1.CORPINFO_ID, t1.USER_ID, t1.APPLY_TYPE, t1.APPLY_STATUS, t1.ISDELETE
FROM SYS_USER_CORP t1
WHERE t1.ISDELETE = '0'
order by u.SORT asc,u.LAST_LOGIN desc
</select> </select>
<!-- 从业人员列表 userlistPage --> <!-- 从业人员列表 userlistPage -->