BUG优化

行车三检 添加安全承诺记录
dev
xiepeng 2024-05-10 17:52:26 +08:00
parent 9564304670
commit 5c93557bc9
10 changed files with 63 additions and 9 deletions

View File

@ -47,7 +47,7 @@ public class AppTrafficSecurityNoticeController extends BaseController {
String errInfo = "success"; String errInfo = "success";
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
pd.put("DELETOR", Jurisdiction.getUSER_ID()); //删除人id pd.put("DELETOR", Jurisdiction.getCORPINFO_ID()); //删除人id
pd.put("DELETORNAME", Jurisdiction.getUsername()); //删除人姓名 pd.put("DELETORNAME", Jurisdiction.getUsername()); //删除人姓名
pd.put("DELETETIME", DateUtil.date2Str(new Date())); //删除时间 pd.put("DELETETIME", DateUtil.date2Str(new Date())); //删除时间
securityNoticeService.delete(pd); securityNoticeService.delete(pd);

View File

@ -4,11 +4,13 @@ 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.TrafficDrivingSignService;
import com.zcloud.service.comprehensive.TrafficDrivingTypeService; 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;
import com.zcloud.util.Tools; import com.zcloud.util.Tools;
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;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -30,6 +32,9 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
@Autowired @Autowired
private TrafficDrivingTypeService trafficDrivingTypeService; private TrafficDrivingTypeService trafficDrivingTypeService;
@Autowired
private TrafficDrivingSignService trafficDrivingSignService;
@RequestMapping(value = "/listForSecurityWaybillre") @RequestMapping(value = "/listForSecurityWaybillre")
@ResponseBody @ResponseBody
@ -69,6 +74,14 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
String errInfo = "success"; String errInfo = "success";
PageData pd = this.getPageData(); PageData pd = this.getPageData();
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd); List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
List<PageData> list = trafficDrivingSignService.findWaybillRegistrationId(pd);
for (PageData pageData : commitmentList) {
for (PageData data : list) {
if(StringUtils.equals(pageData.getString("DRIVINGCOMMITMENT_ID"), data.getString("DRIVINGTYPE_ID"))) {
pageData.put("STATUS", data.getString("STATUS"));
}
}
}
try { try {
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取 pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
// if(pd.getString("OPERATOR")) // if(pd.getString("OPERATOR"))

View File

@ -1,13 +1,11 @@
package com.zcloud.controller.comprehensive; package com.zcloud.controller.comprehensive;
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;
import com.zcloud.service.comprehensive.TrafficDrivingCommitmentService; import com.zcloud.service.comprehensive.*;
import com.zcloud.service.comprehensive.TrafficDrivingTypeService;
import com.zcloud.service.comprehensive.TrafficSecurityCustomerManagementService;
import com.zcloud.service.comprehensive.TrafficSecurityWaybillRegistrationService;
import com.zcloud.service.system.UsersService; import com.zcloud.service.system.UsersService;
import com.zcloud.util.*; import com.zcloud.util.*;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
@ -38,6 +36,9 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
@Autowired @Autowired
private TrafficSecurityCustomerManagementService trafficSecurityCustomerManagementService; private TrafficSecurityCustomerManagementService trafficSecurityCustomerManagementService;
@Autowired
private TrafficDrivingSignService trafficDrivingSignService;
@Autowired @Autowired
private UsersService usersService; private UsersService usersService;
@ -71,7 +72,15 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
String errInfo = "success"; String errInfo = "success";
PageData pd = this.getPageData(); PageData pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
List<PageData> commitmentList = trafficDrivingCommitmentService.getDrivingCommitment(pd); List<PageData> varList = trafficDrivingCommitmentService.getDrivingCommitment(pd);
List<PageData> list = trafficDrivingSignService.findWaybillRegistrationId(pd);
for (PageData pageData : varList) {
for (PageData data : list) {
if(StringUtils.equals(pageData.getString("DRIVINGCOMMITMENT_ID"), data.getString("DRIVINGTYPE_ID"))) {
pageData.put("STATUS", data.getString("STATUS"));
}
}
}
try { try {
pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取 pd = trafficDrivingTypeService.infoCategory(pd); //根据ID读取
// if(pd.getString("OPERATOR")) // if(pd.getString("OPERATOR"))
@ -87,7 +96,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
map.put("result", errInfo); map.put("result", errInfo);
map.put("msg", "数据获取失败"); map.put("msg", "数据获取失败");
} }
map.put("commitmentList", commitmentList); map.put("commitmentList", varList);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }

View File

@ -33,6 +33,7 @@ public class InsureController extends BaseController {
@Autowired @Autowired
private InsureService insureService; private InsureService insureService;
@Autowired @Autowired
private ImgFilesService imgfilesService; private ImgFilesService imgfilesService;

View File

@ -45,4 +45,6 @@ public interface TrafficDrivingSignMapper {
* @throws Exception * @throws Exception
*/ */
PageData findById(PageData pd); PageData findById(PageData pd);
List<PageData> findWaybillRegistrationId(PageData pd);
} }

View File

@ -31,4 +31,6 @@ public interface TrafficDrivingSignService {
void delete(PageData pd); void delete(PageData pd);
PageData findById(PageData pd) throws Exception; PageData findById(PageData pd) throws Exception;
List<PageData> findWaybillRegistrationId(PageData pd);
} }

View File

@ -62,4 +62,9 @@ public class TrafficDrivingSignServiceImpl implements TrafficDrivingSignService
public PageData findById(PageData pd) { public PageData findById(PageData pd) {
return trafficDrivingSignMapper.findById(pd); return trafficDrivingSignMapper.findById(pd);
} }
@Override
public List<PageData> findWaybillRegistrationId(PageData pd) {
return trafficDrivingSignMapper.findWaybillRegistrationId(pd);
}
} }

View File

@ -5,6 +5,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.comprehensive.TrafficDrivingSignMapper; 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.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -12,6 +13,8 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Service @Service
public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService { public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService {
@ -76,6 +79,7 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取 PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取
List<PageData> varOList = trafficDrivingTypeMapper.findListbyDetail(pd); List<PageData> varOList = trafficDrivingTypeMapper.findListbyDetail(pd);
List<PageData> vList = trafficDrivingTypeMapper.findCategory(pd); List<PageData> vList = trafficDrivingTypeMapper.findCategory(pd);
List<PageData> varItemList = trafficDrivingTypeMapper.findListbyItem(pd); List<PageData> varItemList = trafficDrivingTypeMapper.findListbyItem(pd);
List<PageData> pd1Children = new ArrayList<>(); List<PageData> pd1Children = new ArrayList<>();
@ -97,7 +101,10 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
pd1.put("pd1Children",pd1Children); pd1.put("pd1Children",pd1Children);
} }
cpd.put("varList", vList); List<PageData> list1 = vList.stream().parallel().filter(data -> !StringUtils.equals(data.getString("CHECKTYPE_ID"), "status000")).collect(Collectors.toList());
List<PageData> list2 = vList.stream().parallel().filter(data -> StringUtils.equals(data.getString("CHECKTYPE_ID"), "status000")).collect(Collectors.toList());
cpd.put("varList", list1);
cpd.put("varList2", list2);
return cpd; return cpd;
} }
} }

View File

@ -113,7 +113,7 @@
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID
where f.ISDELETE = '0' where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID}
order by f.OPERATTIME DESC order by f.OPERATTIME DESC
</select> </select>

View File

@ -162,4 +162,19 @@
where where
DRIVING_SIGN_ID = #{DRIVING_SIGN_ID} DRIVING_SIGN_ID = #{DRIVING_SIGN_ID}
</delete> </delete>
<select id="findWaybillRegistrationId" parameterType="page" resultType="pd">
select
*,
ci.*
from
<include refid="tableName"/> f
left join bus_traffic_commitment_item ci on ci.DRIVING_SIGN_ID = f.DRIVING_SIGN_ID
where
f.ISDELETE = '0'
AND
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
and
f.CHECKTYPE_ID = 'status000'
</select>
</mapper> </mapper>