Merge remote-tracking branch 'origin/dev' into dev

dev
zhangyanli 2024-05-14 09:20:04 +08:00
commit beea93a80f
21 changed files with 1416 additions and 3 deletions

View File

@ -234,6 +234,8 @@ public class BeidouController extends BaseController {
data.put("ARCHIVES_TYPE", "1");
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
data.put("ARCHIVES_TYPE", "2");
}else {
data.put("ARCHIVES_TYPE", "0");
}
return false;
});

View File

@ -55,6 +55,10 @@ public class AppTrafficSecurityWaybillRegistrationController extends BaseControl
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page);
varList.stream().forEach(data -> {
data.put("TRANSPORTVEHICLE", data.getString("PLATE_NUMBER"));
});
System.out.println("varList = " + varList);
map.put("varList", varList);
map.put("page", page);

View File

@ -142,6 +142,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
List<PageData> varList = customerManagementService.getTrafficCustomerSelectList(pd);
System.out.println("varList = " + varList);
map.put("varList", varList);
map.put("result", errInfo);
return map;

View File

@ -6,6 +6,7 @@ import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.comprehensive.*;
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.*;
import org.apache.commons.lang.ObjectUtils;
@ -39,6 +40,9 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
@Autowired
private TrafficDrivingSignService trafficDrivingSignService;
@Autowired
private OperatingVehiclesService operatingVehiclesService;
@Autowired
private UsersService usersService;
@ -53,6 +57,10 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page);
varList.forEach(data -> {
data.put("TRANSPORTVEHICLE", data.getString("PLATE_NUMBER"));
});
System.out.println("varList = " + varList);
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
@ -199,6 +207,7 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
pd = trafficSecurityWaybillRegistrationService.findById(pd);//根据ID读
pd.put("ENTRUST_PERSON", pd.getString("CLIENTCONTACTPERSON"));
pd.put("CONFIRM_PERSON", pd.getString("CONFIRMINGPERSON"));
pd.put("TRANSPORTVEHICLE", pd.getString("PLATE_NUMBER"));
List<String> dispatchers = Arrays.stream(pd.getString("DISPATCHER").split(",")).collect(Collectors.toList());
List<PageData> names = new ArrayList<>();
dispatchers.forEach(data -> {
@ -269,7 +278,15 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController
}
}
}
PageData pageData = new PageData();
pageData.put("PLATE_NUMBER", pd.getString("TRANSPORTVEHICLE"));
pageData.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
PageData vehicle = operatingVehiclesService.findByfindByPlateNumber(pageData);
if(!ObjectUtil.isEmpty(vehicle)) {
pd.put("TRANSPORTVEHICLE", vehicle.getString("OPERATING_ID"));
}
trafficSecurityWaybillRegistrationService.edit(pd);
map.put("result", errInfo);
map.put("pd", pd);
return map;

View File

@ -180,11 +180,14 @@ public class InspectAnnuallyController extends BaseController {
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = inspectAnnuallyService.list(page); //列出年检列表
System.out.println("varList = " + varList);
varList.stream().anyMatch(data -> {
if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) {
data.put("ARCHIVES_TYPE", "2");
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
data.put("ARCHIVES_TYPE", "1");
}else{
data.put("ARCHIVES_TYPE", "0");
}
return false;
});

View File

@ -28,7 +28,10 @@ import org.springframework.web.servlet.ModelAndView;
import java.io.File;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Controller
@RequestMapping("/operatingvehicles")

View File

@ -178,6 +178,8 @@ public class OperationsController extends BaseController {
data.put("ARCHIVES_TYPE", "2");
} else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) {
data.put("ARCHIVES_TYPE", "1");
}else{
data.put("ARCHIVES_TYPE", "0");
}
return false;
});

View File

@ -62,7 +62,7 @@ public class ImgFilesController extends BaseController {
// 保存文件
File tempFile = new File(file.getOriginalFilename());
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("3") && !TYPE.equals("129")) {//四色图改为json文件,不用判断类型
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("3") && !TYPE.equals("129") && !TYPE.equals("130")) {//四色图改为json文件,不用判断类型
map.put("result", "failed");
map.put("exception", "上传图片格式不正确,请重新上传");
return map;

View File

@ -0,0 +1,175 @@
package com.zcloud.controller.tankTruckInspection;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.tankTruckInspection.TankTruckInspectionService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
/**
*
*/
@Controller
@RequestMapping("/tankTruckInspection")
public class TankTruckInspectionController extends BaseController {
@Autowired
private TankTruckInspectionService tankTruckInspectionService;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/add")
// @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项配置", instructionsOperate = "罐检项配置", instructionsType = "新增")
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("TANKTRUCKINSPECTION_ID", this.get32UUID()); //主键
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
tankTruckInspectionService.save(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/delete")
// @RequiresPermissions( value = {"question:del" , "courseware:del"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项配置", instructionsOperate = "罐检项配置", instructionsType = "删除")
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
tankTruckInspectionService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/edit")
// @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项配置", instructionsOperate = "罐检项配置", instructionsType = "修改")
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
tankTruckInspectionService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value = "/list")
// @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项配置", instructionsOperate = "罐检项配置", instructionsType = "列表")
public Object list(Page page) 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()); //企业ID
page.setPd(pd);
List<PageData> varList = tankTruckInspectionService.list(page); //列出Question列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/goEdit")
// @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项配置", instructionsOperate = "罐检项配置", instructionsType = "去修改页面获取数据")
public Object goEdit() 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 = tankTruckInspectionService.findById(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/tankTruckInspectionListAll")
// @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项配置", instructionsOperate = "罐检项配置", instructionsType = "列表")
public Object tankTruckInspectionListAll() 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()); //企业ID
List<PageData> list = tankTruckInspectionService.tankTruckInspectionListAll(pd); //列出Question列表
map.put("list", list);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,216 @@
package com.zcloud.controller.tankTruckInspection;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.service.tankTruckInspection.TankTruckInspectionRecordService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*/
@Controller
@RequestMapping("/tankTruckInspectionRecord")
public class TankTruckInspectionRecordController extends BaseController {
@Autowired
private TankTruckInspectionRecordService tankTruckInspectionRecordService;
@Autowired
private ImgFilesService imgfilesService;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/add")
// @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR)
@ResponseBody
@Transactional
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项检查", instructionsOperate = "罐检项检查", instructionsType = "新增")
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String TANKTRUCKINSPECTIONRECORD_ID = this.get32UUID();
pd.put("TANKTRUCKINSPECTIONRECORD_ID", TANKTRUCKINSPECTIONRECORD_ID); //主键
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getName()); //添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
tankTruckInspectionRecordService.save(pd);
if (pd.get("DETAILS") != null && !pd.get("DETAILS").equals("")) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("DETAILS").toString());
for (int i = 0; i < list.size(); i++) {
JSONObject json = list.get(i);
PageData itme = new PageData();
itme.put("RECORDDETAIL_ID", this.get32UUID()); //主键
itme.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
itme.put("MAIN_ID", TANKTRUCKINSPECTIONRECORD_ID);
itme.put("INSPECTION_SITE", json.get("INSPECTION_SITE"));
itme.put("REGULATORY_STATUS", json.get("REGULATORY_STATUS"));
itme.put("INSPECTION_STATUS", json.get("INSPECTION_STATUS"));
itme.put("DATA_SORT", i);
itme.put("ISDELETE", 0);
itme.put("CREATOR_ID", Jurisdiction.getUSER_ID()); //添加人id
itme.put("CREATOR_NAME", Jurisdiction.getUsername()); //添加人
itme.put("CREATE_TIME", DateUtil.date2Str(new Date())); //创建时间
tankTruckInspectionRecordService.saveDetail(itme);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/delete")
// @RequiresPermissions( value = {"question:del" , "courseware:del"}, logical = Logical.OR)
@ResponseBody
@Transactional
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项检查", instructionsOperate = "罐检项检查", instructionsType = "删除")
public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
pd.put("DELETEORNAME", Jurisdiction.getName()); //删除人
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
tankTruckInspectionRecordService.delete(pd);
tankTruckInspectionRecordService.deleteDetail(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/edit")
// @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR)
@ResponseBody
@Transactional
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项检查", instructionsOperate = "罐检项检查", instructionsType = "修改")
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
tankTruckInspectionRecordService.edit(pd);
if (pd.get("DETAILS") != null && !pd.get("DETAILS").equals("")) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("DETAILS").toString());
tankTruckInspectionRecordService.deleteDetail(pd);
for (int i = 0; i < list.size(); i++) {
JSONObject json = list.get(i);
PageData itme = new PageData();
itme.put("RECORDDETAIL_ID", this.get32UUID()); //主键
itme.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
itme.put("MAIN_ID", pd.get("TANKTRUCKINSPECTIONRECORD_ID"));
itme.put("INSPECTION_SITE", json.get("INSPECTION_SITE"));
itme.put("REGULATORY_STATUS", json.get("REGULATORY_STATUS"));
itme.put("INSPECTION_STATUS", json.get("INSPECTION_STATUS"));
itme.put("DATA_SORT", i);
itme.put("ISDELETE", 0);
itme.put("CREATOR_ID", Jurisdiction.getUSER_ID()); //添加人id
itme.put("CREATOR_NAME", Jurisdiction.getUsername()); //添加人
itme.put("CREATE_TIME", DateUtil.date2Str(new Date())); //创建时间
tankTruckInspectionRecordService.saveDetail(itme);
}
}
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value = "/list")
// @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项检查", instructionsOperate = "罐检项检查", instructionsType = "列表")
public Object list(Page page) 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()); //企业ID
page.setPd(pd);
List<PageData> varList = tankTruckInspectionRecordService.list(page); //列出Question列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/goEdit")
// @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "罐检项检查", instructionsOperate = "罐检项检查", instructionsType = "去修改页面获取数据")
public Object goEdit() 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 = tankTruckInspectionRecordService.findById(pd); //根据ID读取
map.put("pd", pd);
List<PageData> pd2 = tankTruckInspectionRecordService.findById2(pd);
map.put("detail", pd2);
pd.put("FOREIGN_KEY", pd.getString("TANKTRUCKINSPECTIONRECORD_ID"));
pd.put("TYPE", 130);
List<PageData> inspectionAttachmentImgs = imgfilesService.listAll(pd);//检查附件
pd.put("TYPE", 131);
List<PageData> inspectionImgs = imgfilesService.listAll(pd);//检查图片
map.put("inspectionAttachmentImgs", inspectionAttachmentImgs);
map.put("inspectionImgs", inspectionImgs);
map.put("result", errInfo);
return map;
}
}

View File

@ -2,6 +2,7 @@ package com.zcloud.controller.taxationManage;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.util.DateUtils;
import com.aliyuncs.facebody.model.v20191230.PedestrianDetectAttributeResponse;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
@ -168,6 +171,43 @@ public class TaxationManageController extends BaseController {
}
return false;
});
varList.forEach(data -> {
Date dueDate = DateUtil.fomatDate(data.getString("EXPIRE_DATE"));
Date reminderDate = DateUtil.fomatDate(data.getString("REMINDER_DATA"));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String toDay = sdf.format(new Date());
Date date = null;
try {
date = sdf.parse(toDay);
} catch (ParseException e) {
throw new RuntimeException(e);
}
// 已到期
if(dueDate.before(date)) {
data.put("EXPIRE_STATUS", "0");
try {
taxationManageService.edit(data);
} catch (Exception e) {
throw new RuntimeException(e);
}
// 即将到期
} else if ((dueDate.after(date) || dueDate.equals(date)) && (reminderDate.before(date) || reminderDate.equals(date))) {
data.put("EXPIRE_STATUS", "2");
try {
taxationManageService.edit(data);
} catch (Exception e) {
throw new RuntimeException(e);
}
// 未到期
}else{
data.put("EXPIRE_STATUS", "1");
try {
taxationManageService.edit(data);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);

View File

@ -0,0 +1,64 @@
package com.zcloud.mapper.datasource.tankTruckInspection;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
*/
public interface TankTruckInspectionMapper {
/**
*
*
* @param pd
* @throws Exception
*/
void save(PageData pd);
void saveAll(PageData pd);
void saveAllDel(PageData pd);
/**
*
*
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
*
*
* @param pd
* @throws Exception
*/
void edit(PageData pd);
void edit2(PageData pd);
/**
*
*
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> datalistPage2(Page page);
PageData findById(PageData pd);
PageData findById2(PageData pd);
List<PageData> tankTruckInspectionListAll(PageData pd);
List<PageData> tankTruckInspectionListAll2(PageData pd);
int dataCount(String corpId);
}

View File

@ -0,0 +1,58 @@
package com.zcloud.mapper.datasource.tankTruckInspection;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
*/
public interface TankTruckInspectionRecordMapper {
/**
*
*
* @param pd
* @throws Exception
*/
void save(PageData pd);
void saveDetail(PageData pd);
/**
*
*
* @param pd
* @throws Exception
*/
void delete(PageData pd);
void deleteDetail(PageData pd);
/**
*
*
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
*
*
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
List<PageData> datalistPage2(Page page);
PageData findById(PageData pd);
List<PageData> findById2(PageData pd);
int dataCount(String corpId);
}

View File

@ -77,6 +77,7 @@ public class TrafficDrivingTypeServiceImpl implements TrafficDrivingTypeService
*/
public PageData infoCategory(PageData pd)throws Exception{
PageData cpd = TrafficSecurityWaybillRegistrationMapper.findById(pd); // 根据ID读取
cpd.put("TRANSPORTVEHICLE", cpd.getString("PLATE_NUMBER"));
List<PageData> varOList = trafficDrivingTypeMapper.findListbyDetail(pd);
List<PageData> vList = trafficDrivingTypeMapper.findCategory(pd);

View File

@ -0,0 +1,61 @@
package com.zcloud.service.tankTruckInspection;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
*/
public interface TankTruckInspectionRecordService {
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception;
public void saveDetail(PageData pd) throws Exception;
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception;
public void deleteDetail(PageData pd) throws Exception;
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception;
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception;
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception;
public List<PageData> findById2(PageData pd) throws Exception;
}

View File

@ -0,0 +1,63 @@
package com.zcloud.service.tankTruckInspection;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
*
*/
public interface TankTruckInspectionService {
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception;
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception;
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception;
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception;
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception;
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> tankTruckInspectionListAll(PageData pd) throws Exception;
}

View File

@ -0,0 +1,88 @@
package com.zcloud.service.tankTruckInspection.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.tankTruckInspection.TankTruckInspectionRecordMapper;
import com.zcloud.service.tankTruckInspection.TankTruckInspectionRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
*/
@Service
@Transactional
public class TankTruckInspectionRecordServiceImpl implements TankTruckInspectionRecordService {
@Autowired
private TankTruckInspectionRecordMapper tankTruckInspectionRecordMapper;
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception {
tankTruckInspectionRecordMapper.save(pd);
}
public void saveDetail(PageData pd) throws Exception {
tankTruckInspectionRecordMapper.saveDetail(pd);
}
/**
*
* e
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
tankTruckInspectionRecordMapper.delete(pd);
}
public void deleteDetail(PageData pd) throws Exception {
tankTruckInspectionRecordMapper.deleteDetail(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception {
tankTruckInspectionRecordMapper.edit(pd);
}
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception {
return tankTruckInspectionRecordMapper.datalistPage(page);
}
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception {
return tankTruckInspectionRecordMapper.findById(pd);
}
public List<PageData> findById2(PageData pd) throws Exception {
return tankTruckInspectionRecordMapper.findById2(pd);
}
}

View File

@ -0,0 +1,118 @@
package com.zcloud.service.tankTruckInspection.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.tankTruckInspection.TankTruckInspectionMapper;
import com.zcloud.service.tankTruckInspection.TankTruckInspectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
*
*/
@Service
@Transactional
public class TankTruckInspectionServiceImpl implements TankTruckInspectionService {
@Autowired
private TankTruckInspectionMapper tankTruckInspectionMapper;
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception {
int dataCount = tankTruckInspectionMapper.dataCount(pd.get("CORPINFO_ID").toString());
if (dataCount > 0) {
tankTruckInspectionMapper.save(pd);
} else {
tankTruckInspectionMapper.saveAll(pd);
tankTruckInspectionMapper.save(pd);
}
}
/**
*
* e
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
int dataCount = tankTruckInspectionMapper.dataCount(pd.get("CORPINFO_ID").toString());
if (dataCount > 0) {
tankTruckInspectionMapper.delete(pd);
} else {
tankTruckInspectionMapper.saveAllDel(pd);
}
}
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception {
int dataCount = tankTruckInspectionMapper.dataCount(pd.get("CORPINFO_ID").toString());
if (dataCount > 0) {
tankTruckInspectionMapper.edit(pd);
} else {
tankTruckInspectionMapper.edit2(pd);
}
}
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception {
int dataCount = tankTruckInspectionMapper.dataCount(page.getPd().get("CORPINFO_ID").toString());
if (dataCount > 0) {
return tankTruckInspectionMapper.datalistPage(page);
} else {
return tankTruckInspectionMapper.datalistPage2(page);
}
}
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception {
int dataCount = tankTruckInspectionMapper.dataCount(pd.get("CORPINFO_ID").toString());
if (dataCount > 0) {
return tankTruckInspectionMapper.findById(pd);
} else {
return tankTruckInspectionMapper.findById2(pd);
}
}
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> tankTruckInspectionListAll(PageData pd) throws Exception {
int dataCount = tankTruckInspectionMapper.dataCount(pd.get("CORPINFO_ID").toString());
if (dataCount > 0) {
return tankTruckInspectionMapper.tankTruckInspectionListAll(pd);
} else {
return tankTruckInspectionMapper.tankTruckInspectionListAll2(pd);
}
}
}

View File

@ -206,7 +206,8 @@
c.CUSTOMERNAME AS CLIENT_NAME,
c2.CUSTOMERNAME AS CONFIRMER_NAME,
t.OPERATTIME AS STARTTIME,
p.OPERATTIME AS STOPTIME
p.OPERATTIME AS STOPTIME,
bto.PLATE_NUMBER
from
<include refid="tableName"></include> f
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
@ -217,6 +218,7 @@
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'
left join bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.TRANSPORTVEHICLE
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.WAYBILLSTATUS != null and pd.WAYBILLSTATUS != ''"><!-- 关键词检索-运单状态 -->
and f.WAYBILLSTATUS = #{pd.WAYBILLSTATUS}
@ -260,7 +262,8 @@
b2.ADMINISTRATIVEREGIONS AS GOAL_ADDR,
oa.NAME AS DEPARTMENTNAME,
btcc.CONTACT AS ENTRUSTPERSON,
btcc2.CONTACT AS CONFIRMPERSON
btcc2.CONTACT AS CONFIRMPERSON,
bto.PLATE_NUMBER
from
<include refid="tableName"></include> f
left join bus_traffic_operatingvehicle e on f.TRANSPORTVEHICLE = e.PLATE_NUMBER
@ -275,6 +278,7 @@
left join bus_traffic_customer_contact btcc on btcc.CONTACT_ID = f.CLIENTCONTACTPERSON
left join bus_traffic_customer_contact btcc2 on btcc2.CONTACT_ID = f.CONFIRMINGPERSON
left join oa_department oa on oa.DEPARTMENT_ID = f.DEPARTMENT_ID
left join bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.TRANSPORTVEHICLE
where
f.WAYBILLREGISTRATION_ID = #{WAYBILLREGISTRATION_ID}
AND

View File

@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.tankTruckInspection.TankTruckInspectionMapper">
<!--表名 -->
<sql id="tableName">
bus_traffic_tank_truck_inspection_corp
</sql>
<!-- 字段 -->
<sql id="Field">
f.FREIGHTTRAILER_ID,
f.CORPINFO_ID,
f.NUM,
f.PLATE_NUMBER,
f.VIN,
f.VEHICLE_BODY_NUMBER,
f.TRAILER_TYPE,
f.OPER_CERTIFICATE_NUM,
f.BELONGING_DEPT,
f.CAR_OWNERS,
f.CAR_OWNERS_TEL,
f.CONTACTS,
f.CONTACT_PHONE,
f.INITIAL_REGISTRATION_DATE,
f.CERTIFICATE_DATE,
f.DUE_DATE,
f.TRAILER_BRAND,
f.TRAILER_MODEL,
f.APPROVED_TOTAL_MASS,
f.APPROVED_LOAD_CAPACITY,
f.VOLUME,
f.NOTES,
f.TRAILER_IMG,
f.DRIVING_LICENSE_IMG,
f.OPER_CERTIFICATE_IMG,
f.TRAILER_INFO,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.ISDELETE,
f.ISSCRAP,
f.ISASSIGNED
</sql>
<!-- 字段 -->
<sql id="Field2">
TANKTRUCKINSPECTION_ID,
CORPINFO_ID,
INSPECTION_SITE,
REGULATORY_STATUS,
CREATOR,
CREATORNAME,
CREATTIME,
ISDELETE
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{TANKTRUCKINSPECTION_ID},
#{CORPINFO_ID},
#{INSPECTION_SITE},
#{REGULATORY_STATUS},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{ISDELETE}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<insert id="saveAll" parameterType="pd">
INSERT INTO
bus_traffic_tank_truck_inspection_corp
(TANKTRUCKINSPECTION_ID,CORPINFO_ID,INSPECTION_SITE,REGULATORY_STATUS,ISDELETE,CREATOR,CREATORNAME,CREATTIME)
SELECT REPLACE(UUID(),'-',''),#{CORPINFO_ID},INSPECTION_SITE,REGULATORY_STATUS,0,
#{CREATOR},#{CREATORNAME},NOW() from bus_traffic_tank_truck_inspection
</insert>
<insert id="saveAllDel" parameterType="pd">
INSERT INTO
bus_traffic_tank_truck_inspection_corp
(TANKTRUCKINSPECTION_ID,CORPINFO_ID,INSPECTION_SITE,REGULATORY_STATUS,ISDELETE,CREATOR,CREATORNAME,CREATTIME)
SELECT REPLACE(UUID(),'-',''),#{CORPINFO_ID},INSPECTION_SITE,REGULATORY_STATUS,0,
#{CREATOR},#{CREATORNAME},NOW() from bus_traffic_tank_truck_inspection where TANKTRUCKINSPECTION_ID != #{TANKTRUCKINSPECTION_ID}
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1',
DELETEOR = #{DELETEOR},
DELETEORNAME = #{DELETEORNAME},
DELETTIME = #{DELETTIME}
where
TANKTRUCKINSPECTION_ID = #{TANKTRUCKINSPECTION_ID}
AND
CORPINFO_ID = #{CORPINFO_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
INSPECTION_SITE = #{INSPECTION_SITE},
REGULATORY_STATUS = #{REGULATORY_STATUS},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME}
where
TANKTRUCKINSPECTION_ID = #{TANKTRUCKINSPECTION_ID}
</update>
<update id="edit2" parameterType="pd">
INSERT INTO
bus_traffic_tank_truck_inspection_corp
(TANKTRUCKINSPECTION_ID,CORPINFO_ID,INSPECTION_SITE,REGULATORY_STATUS,ISDELETE,CREATOR,CREATORNAME,CREATTIME)
SELECT REPLACE(UUID(),'-',''),#{CORPINFO_ID},INSPECTION_SITE,REGULATORY_STATUS,0,
#{CREATOR},#{CREATORNAME},NOW() from bus_traffic_tank_truck_inspection where TANKTRUCKINSPECTION_ID != #{TANKTRUCKINSPECTION_ID}
union all
SELECT REPLACE(UUID(),'-',''),#{CORPINFO_ID},#{INSPECTION_SITE},#{REGULATORY_STATUS},0,
#{CREATOR},#{CREATORNAME},NOW() from bus_traffic_tank_truck_inspection where TANKTRUCKINSPECTION_ID = #{TANKTRUCKINSPECTION_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
f.TANKTRUCKINSPECTION_ID,
f.INSPECTION_SITE,
f.REGULATORY_STATUS
from
<include refid="tableName"></include> f
where
f.TANKTRUCKINSPECTION_ID = #{TANKTRUCKINSPECTION_ID}
</select>
<select id="findById2" parameterType="pd" resultType="pd">
select
f.TANKTRUCKINSPECTION_ID,
f.INSPECTION_SITE,
f.REGULATORY_STATUS
from
bus_traffic_tank_truck_inspection f
where
f.TANKTRUCKINSPECTION_ID = #{TANKTRUCKINSPECTION_ID}
</select>
<!-- 列表
INSPECTION_SITE 检查部位
REGULATORY_STATUS 规定状态
-->
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.*
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.INSPECTION_SITE != null and pd.INSPECTION_SITE != ''">
and f.INSPECTION_SITE LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_SITE}),'%')
</if>
<if test="pd.REGULATORY_STATUS != null and pd.REGULATORY_STATUS != ''">
and f.REGULATORY_STATUS LIKE CONCAT(CONCAT('%', #{pd.REGULATORY_STATUS}),'%')
</if>
order by f.CREATTIME desc
</select>
<select id="datalistPage2" parameterType="page" resultType="pd">
select
f.*
from
bus_traffic_tank_truck_inspection f
<where>
<if test="pd.INSPECTION_SITE != null and pd.INSPECTION_SITE != ''">
and f.INSPECTION_SITE LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_SITE}),'%')
</if>
<if test="pd.REGULATORY_STATUS != null and pd.REGULATORY_STATUS != ''">
and f.REGULATORY_STATUS LIKE CONCAT(CONCAT('%', #{pd.REGULATORY_STATUS}),'%')
</if>
</where>
</select>
<select id="tankTruckInspectionListAll" parameterType="pd" resultType="pd">
select
*
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID}
<if test="INSPECTION_SITE != null and INSPECTION_SITE != ''">
and f.INSPECTION_SITE LIKE CONCAT(CONCAT('%', #{INSPECTION_SITE}),'%')
</if>
<if test="REGULATORY_STATUS != null and REGULATORY_STATUS != ''">
and f.REGULATORY_STATUS LIKE CONCAT(CONCAT('%', #{REGULATORY_STATUS}),'%')
</if>
order by f.CREATTIME desc
</select>
<select id="tankTruckInspectionListAll2" parameterType="page" resultType="pd">
SELECT
*
FROM
bus_traffic_tank_truck_inspection
<where>
<if test="INSPECTION_SITE != null and INSPECTION_SITE != ''">
and INSPECTION_SITE LIKE CONCAT(CONCAT('%', #{INSPECTION_SITE}),'%')
</if>
<if test="REGULATORY_STATUS != null and REGULATORY_STATUS != ''">
and REGULATORY_STATUS LIKE CONCAT(CONCAT('%', #{REGULATORY_STATUS}),'%')
</if>
</where>
</select>
<select id="dataCount" parameterType="page" resultType="integer">
select
count(*) num
from
bus_traffic_tank_truck_inspection_corp f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId}
</select>
</mapper>

View File

@ -0,0 +1,262 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.mapper.datasource.tankTruckInspection.TankTruckInspectionRecordMapper">
<!--表名 -->
<sql id="tableName">
bus_traffic_tank_truck_inspection_record
</sql>
<!-- 字段 -->
<sql id="Field">
f.FREIGHTTRAILER_ID,
f.CORPINFO_ID,
f.NUM,
f.PLATE_NUMBER,
f.VIN,
f.VEHICLE_BODY_NUMBER,
f.TRAILER_TYPE,
f.OPER_CERTIFICATE_NUM,
f.BELONGING_DEPT,
f.CAR_OWNERS,
f.CAR_OWNERS_TEL,
f.CONTACTS,
f.CONTACT_PHONE,
f.INITIAL_REGISTRATION_DATE,
f.CERTIFICATE_DATE,
f.DUE_DATE,
f.TRAILER_BRAND,
f.TRAILER_MODEL,
f.APPROVED_TOTAL_MASS,
f.APPROVED_LOAD_CAPACITY,
f.VOLUME,
f.NOTES,
f.TRAILER_IMG,
f.DRIVING_LICENSE_IMG,
f.OPER_CERTIFICATE_IMG,
f.TRAILER_INFO,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.ISDELETE,
f.ISSCRAP,
f.ISASSIGNED
</sql>
<!-- 字段 -->
<sql id="Field2">
TANKTRUCKINSPECTIONRECORD_ID,
CORPINFO_ID,
VEHICLE,
INSPECTION_DATE,
INSPECTIONTOR,
DUE_DATE,
INSPECTION_CYCLE,
REMINDER_DAYS,
REMINDER_DATE,
REMINDER_STATUS,
INSPECTION_ATTACHMENT,
INSPECTION_IMG,
NOTES,
CREATOR,
CREATORNAME,
CREATTIME,
ISDELETE
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{TANKTRUCKINSPECTIONRECORD_ID},
#{CORPINFO_ID},
#{VEHICLE},
#{INSPECTION_DATE},
#{INSPECTIONTOR},
#{DUE_DATE},
#{INSPECTION_CYCLE},
#{REMINDER_DAYS},
#{REMINDER_DATE},
#{REMINDER_STATUS},
#{INSPECTION_ATTACHMENT},
#{INSPECTION_IMG},
#{NOTES},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{ISDELETE}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<insert id="saveDetail" parameterType="pd">
insert into
bus_traffic_tank_truck_inspection_record_detail
(
RECORDDETAIL_ID,
CORPINFO_ID,
MAIN_ID,
INSPECTION_SITE,
REGULATORY_STATUS,
INSPECTION_STATUS,
DATA_SORT,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME
) values (
#{RECORDDETAIL_ID},
#{CORPINFO_ID},
#{MAIN_ID},
#{INSPECTION_SITE},
#{REGULATORY_STATUS},
#{INSPECTION_STATUS},
#{DATA_SORT},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME}
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1',
DELETEOR = #{DELETEOR},
DELETEORNAME = #{DELETEORNAME},
DELETTIME = #{DELETTIME}
where
TANKTRUCKINSPECTIONRECORD_ID = #{TANKTRUCKINSPECTIONRECORD_ID}
</delete>
<delete id="deleteDetail" parameterType="pd">
update
bus_traffic_tank_truck_inspection_record_detail
set
ISDELETE = '1',
DELETEOR = #{DELETEOR},
DELETEORNAME = #{DELETEORNAME},
DELETTIME = #{DELETTIME}
where
MAIN_ID = #{TANKTRUCKINSPECTIONRECORD_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
VEHICLE = #{VEHICLE},
INSPECTION_DATE = #{INSPECTION_DATE},
INSPECTIONTOR = #{INSPECTIONTOR},
DUE_DATE = #{DUE_DATE},
INSPECTION_CYCLE = #{INSPECTION_CYCLE},
REMINDER_DAYS = #{REMINDER_DAYS},
REMINDER_DATE = #{REMINDER_DATE},
REMINDER_STATUS = #{REMINDER_STATUS},
INSPECTION_ATTACHMENT = #{INSPECTION_ATTACHMENT},
INSPECTION_IMG = #{INSPECTION_IMG},
NOTES = #{NOTES},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME}
where
TANKTRUCKINSPECTIONRECORD_ID = #{TANKTRUCKINSPECTIONRECORD_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
f.TANKTRUCKINSPECTIONRECORD_ID,
f.CORPINFO_ID,
f.VEHICLE,
f.INSPECTION_DATE,
f.INSPECTIONTOR,
f.DUE_DATE,
f.INSPECTION_CYCLE,
f.REMINDER_DAYS,
f.REMINDER_DATE,
f.REMINDER_STATUS,
f.INSPECTION_ATTACHMENT,
f.INSPECTION_IMG,
f.NOTES,
(SELECT PLATE_NUMBER FROM `v_traffic` where ID = f.VEHICLE) VEHICLE_NAME,
(select GROUP_CONCAT(NAME SEPARATOR ',') from sys_user where FIND_IN_SET(USER_ID,f.INSPECTIONTOR)) INSPECTIONTOR_NAME
from
<include refid="tableName"></include> f
where
f.TANKTRUCKINSPECTIONRECORD_ID = #{TANKTRUCKINSPECTIONRECORD_ID}
</select>
<select id="findById2" parameterType="page" resultType="pd">
select
f.RECORDDETAIL_ID,
f.CORPINFO_ID,
f.MAIN_ID,
f.INSPECTION_SITE,
f.REGULATORY_STATUS,
f.INSPECTION_STATUS
from
bus_traffic_tank_truck_inspection_record_detail f
where
f.MAIN_ID = #{TANKTRUCKINSPECTIONRECORD_ID}
and f.ISDELETE = '0'
order by DATA_SORT
</select>
<!-- 列表
INSPECTION_SITE 检查部位
REGULATORY_STATUS 规定状态
-->
<select id="datalistPage" parameterType="page" resultType="pd">
select
f.*,
(SELECT PLATE_NUMBER FROM `v_traffic` where ID = f.VEHICLE) VEHICLE_NAME,
(select GROUP_CONCAT(NAME SEPARATOR ',') from sys_user where FIND_IN_SET(USER_ID,f.INSPECTIONTOR)) INSPECTIONTOR_NAME
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.VEHICLE != null and pd.VEHICLE != ''">
and f.VEHICLE LIKE CONCAT(CONCAT('%', #{pd.VEHICLE}),'%')
</if>
<if test="pd.INSPECTIONTOR != null and pd.INSPECTIONTOR != ''">
and f.INSPECTIONTOR LIKE CONCAT(CONCAT('%', #{pd.INSPECTIONTOR}),'%')
</if>
<if test="pd.INSPECTION_DATE != null and pd.INSPECTION_DATE != ''">
and f.INSPECTION_DATE = #{pd.INSPECTION_DATE}
</if>
order by f.CREATTIME desc
</select>
<select id="datalistPage2" parameterType="page" resultType="pd">
select
f.*
from
bus_traffic_tank_truck_inspection f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.INSPECTION_SITE != null and pd.INSPECTION_SITE != ''">
and f.INSPECTION_SITE LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_SITE}),'%')
</if>
<if test="pd.REGULATORY_STATUS != null and pd.REGULATORY_STATUS != ''">
and f.REGULATORY_STATUS LIKE CONCAT(CONCAT('%', #{pd.REGULATORY_STATUS}),'%')
</if>
</select>
<select id="dataCount" parameterType="page" resultType="integer">
select
count(*) num
from
bus_traffic_tank_truck_inspection_corp f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId}
</select>
</mapper>