bug优化

dev
WenShiJun 2024-03-26 18:01:53 +08:00
parent d2555a192a
commit 2e121cfabc
17 changed files with 184 additions and 105 deletions

View File

@ -7,12 +7,17 @@ import com.zcloud.logs.LogAnno;
import com.zcloud.service.beidou.BeidouService;
import com.zcloud.service.maintenance.MaintenanceService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.Const;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import org.apache.commons.lang.StringUtils;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import java.util.Date;
import java.util.HashMap;
@ -30,6 +35,8 @@ public class BeidouController extends BaseController {
private BeidouService beidouService;
@Autowired
private ImgFilesService imgfilesService;
@Autowired
private Smb smb;
/**
*
@ -41,7 +48,7 @@ public class BeidouController extends BaseController {
// @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "机务档案", menuServer = "北斗管理", instructionsOperate = "北斗管理", instructionsType = "新增")
public Object add() throws Exception {
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
@ -52,8 +59,25 @@ public class BeidouController 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("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
pd.put("ARCHIVES_TYPE", "正常"); //档案状态
String ffile = DateUtil.getDays();
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) {
errInfo = "fail";
map.put("result", errInfo);
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
pd.put("CONTRACT", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
}
beidouService.save(pd);
map.put("pd", pd);
map.put("result", errInfo);

View File

@ -60,7 +60,8 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
@ -109,7 +110,8 @@ public class TrafficSafetyOccupationalHazardsController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));

View File

@ -59,7 +59,8 @@ public class TrafficSafetyResponsibilityController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
@ -103,7 +104,8 @@ public class TrafficSafetyResponsibilityController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));

View File

@ -59,7 +59,8 @@ public class TrafficSecurityCommitmentController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
@ -102,7 +103,8 @@ public class TrafficSecurityCommitmentController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));

View File

@ -58,7 +58,8 @@ public class TrafficSecurityLaborContractController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
@ -107,7 +108,8 @@ public class TrafficSecurityLaborContractController extends BaseController {
map.put("msg", "文件格式不正确!");
return map;
}
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
// String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName =file.getOriginalFilename();
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile);
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));

View File

@ -14,7 +14,9 @@ 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 org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
/**
@ -154,6 +156,18 @@ public class FreighttTrailerController extends BaseController {
return map;
}
/**
*
*
* @param response
* @throws Exception
*/
@RequestMapping(value = "/downExcel")
public void downExcel(HttpServletResponse response) throws Exception {
FileDownload.fileDownload(response, PathUtil.getProjectpath() + Const.FILEPATHFILE + "truckExcelTemplate.xls", "货车挂车导入模板.xls");
}
/**
*
*
@ -214,6 +228,43 @@ public class FreighttTrailerController extends BaseController {
return map;
}
/**excel
* @param
* @throws Exception
*/
@RequestMapping(value="/excel")
// // @RequiresPermissions("toExcel")
public ModelAndView exportExcel() throws Exception{
ModelAndView mv = new ModelAndView();
PageData pd = new PageData();
pd = this.getPageData();
String DATA_IDS = pd.getString("DATA_IDS");
if(Tools.notEmpty(DATA_IDS)){
String[] ArrayDATA_IDS = DATA_IDS.split(",");
pd.put("ArrayDATA_IDS",ArrayDATA_IDS);
}
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
Map<String,Object> dataMap = new HashMap<String,Object>();
List<String> titles = new ArrayList<String>();
titles.add("所属企业"); //1
titles.add("风险点(单元)名称"); //2
titles.add("所属部门"); //3
dataMap.put("titles", titles);
List<PageData> varOList = freightTrailerService.listOut(pd);
List<PageData> varList = new ArrayList<PageData>();
for(int i=0;i<varOList.size();i++){
PageData vpd = new PageData();
vpd.put("var1", varOList.get(i).getString("CORP_NAME")); //1
vpd.put("var2", varOList.get(i).getString("RISKUNITNAME")); //2
vpd.put("var3", varOList.get(i).getString("DEPT_NAME")); //6
varList.add(vpd);
}
dataMap.put("varList", varList);
ObjectExcelView erv = new ObjectExcelView();
mv = new ModelAndView(erv,dataMap);
return mv;
}
/**
*

View File

@ -74,5 +74,7 @@ public interface FreightTrailerMapper {
* @throws Exception
*/
List<PageData> vehicleList(PageData pd);
List<PageData> listOut(PageData pd);
}

View File

@ -75,5 +75,6 @@ public interface FreightTrailerService {
*/
public List<PageData> vehicleList(PageData pd) throws Exception;
List<PageData> listOut(PageData pd);
}

View File

@ -103,5 +103,10 @@ public class FreightTrailerServiceImpl implements FreightTrailerService {
return freightTrailerMapper.vehicleList(pd);
}
@Override
public List<PageData> listOut(PageData pd) {
return freightTrailerMapper.listOut(pd);
}
}

View File

@ -40,6 +40,9 @@
BEIDOUINFO,
NOTES,
NUM,
CONTRACT,
CERTIFICATE,
TRANSPORTATIONCOMPANY,
ISDELETE,
CREATOR,
CREATORNAME,
@ -84,6 +87,9 @@
#{BEIDOUINFO},
#{NOTES},
#{NUM},
#{CONTRACT},
#{CERTIFICATE},
#{TRANSPORTATIONCOMPANY},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
@ -182,7 +188,9 @@
f.REMINDER_DAYS,
f.REMINDER_DATE,
f.REMINDER_STATUS,
f.CERTIFICATE,
(select t.FILEPATH from bus_imgfiles t where t.TYPE = 128 and t.FOREIGN_KEY = f.BEIDOU_ID limit 1) as BEIDOUINFO,
(select t.FILEPATH from bus_imgfiles t where t.TYPE = 129 and t.FOREIGN_KEY = f.BEIDOU_ID limit 1) as CONTRACTINFO, -- 新增合同图片路径
f.NOTES,
f.ARCHIVES_TYPE,
f.ISDELETE,

View File

@ -21,6 +21,7 @@
f.EXPIRYDATE,
f.ATTACHMENT_ROUTE,
f.USER_ID,
f.CONTENT,
f.ISDELETE,
f.DELETOR,
f.DELETORNAME,
@ -43,6 +44,7 @@
EXPIRYDATE,
ATTACHMENT_ROUTE,
USER_ID,
CONTENT,
ISDELETE,
DELETOR,
DELETORNAME,
@ -65,6 +67,7 @@
#{EXPIRYDATE},
#{ATTACHMENT_ROUTE},
#{USER_ID},
#{CONTENT},
#{ISDELETE},
#{DELETOR},
#{DELETORNAME},
@ -97,6 +100,7 @@
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
EXPIRYDATE = #{EXPIRYDATE},
CONTENT = #{CONTENT},
ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}
<if test="VALIDSTATUS != null">
, VALIDSTATUS = #{VALIDSTATUS}
@ -127,24 +131,25 @@
c.COMPLETIONSTATUS,
c.VALIDSTATUS,
c.EXPIRYDATE,
c.CONTENT,
c.CREATETIME,
c.OPERATTIME,
c.OCCUPATIONALHAZARDS_ID
from
sys_user u
left join bus_corp_info i on u.CORPINFO_ID = i.CORPINFO_ID
left join BUS_TRAFFIC_OCCUPATIONAL_HAZARDS c on u.USER_ID = c.USER_ID
left join BUS_TRAFFIC_OCCUPATIONAL_HAZARDS c on u.USER_ID = c.USER_ID and c.ISDELETE !='1'
where u.ISDELETE = '0'
and u.ISMAIN != '1'
and (c.VALIDSTATUS != '2' or c.VALIDSTATUS is null)
<if test="pd.OCCUPATIONALNAME != null and pd.OCCUPATIONALNAME != ''"><!-- 关键词检索-名称 -->
and c.OCCUPATIONALNAME like CONCAT('%',#{pd.OCCUPATIONALNAME},'%')
</if>
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''"><!-- 关键词检索-完成状态 -->
and c.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''">
and COALESCE(c.COMPLETIONSTATUS, '0') = #{pd.COMPLETIONSTATUS}
</if>
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
and c.VALIDSTATUS = #{pd.VALIDSTATUS}
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''">
and COALESCE(c.VALIDSTATUS, '0') = #{pd.VALIDSTATUS}
</if>
</select>

View File

@ -131,26 +131,8 @@
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
and f.VALIDSTATUS = #{pd.VALIDSTATUS}
</if>
ORDER BY f.CREATETIME DESC
</select>
<!-- <select id="datalistPage" parameterType="page" resultType="pd">-->
<!-- select-->
<!-- u.NAME,-->
<!-- u.USER_ID,-->
<!-- i.CORP_NAME,-->
<!-- c.SYSTEMNAME,-->
<!-- c.COMPLETIONSTATUS,-->
<!-- c.VALIDSTATUS,-->
<!-- c.EXPIRYDATE,-->
<!-- c.CREATETIME,-->
<!-- c.OPERATTIME,-->
<!-- c.SAFETYPRODUCTION_ID-->
<!-- from-->
<!-- sys_user u-->
<!-- left join bus_corp_info i on u.CORPINFO_ID = i.CORPINFO_ID-->
<!-- left join BUS_TRAFFIC_SAFETY_PRODUCTION c on u.USER_ID = c.USER_ID-->
<!-- where u.ISDELETE = '0'-->
<!-- and u.ISMAIN != '1'-->
<!-- </select>-->
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
select

View File

@ -21,6 +21,7 @@
f.EXPIRYDATE,
f.ATTACHMENT_ROUTE,
f.USER_ID,
f.CONTENT,
f.ISDELETE,
f.DELETOR,
f.DELETORNAME,
@ -43,6 +44,7 @@
EXPIRYDATE,
ATTACHMENT_ROUTE,
USER_ID,
CONTENT,
ISDELETE,
DELETOR,
DELETORNAME,
@ -65,6 +67,7 @@
#{EXPIRYDATE},
#{ATTACHMENT_ROUTE},
#{USER_ID},
#{CONTENT},
#{ISDELETE},
#{DELETOR},
#{DELETORNAME},
@ -97,6 +100,7 @@
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
EXPIRYDATE = #{EXPIRYDATE},
CONTENT = #{CONTENT},
ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}
<if test="VALIDSTATUS != null">
, VALIDSTATUS = #{VALIDSTATUS}
@ -129,11 +133,12 @@
c.EXPIRYDATE,
c.CREATETIME,
c.OPERATTIME,
c.CONTENT,
c.SAFETYRESPONSIBILITY_ID
from
sys_user u
left join bus_corp_info i on u.CORPINFO_ID = i.CORPINFO_ID
left join BUS_TRAFFIC_SAFETY_RESPONSIBILITY c on u.USER_ID = c.USER_ID
left join BUS_TRAFFIC_SAFETY_RESPONSIBILITY c on u.USER_ID = c.USER_ID and c.ISDELETE !='1'
where u.ISDELETE = '0'
and u.ISMAIN != '1'
and (c.VALIDSTATUS != '2' or c.VALIDSTATUS is null)
@ -141,10 +146,10 @@
and c.RESPONSIBILITYNAME like CONCAT('%',#{pd.RESPONSIBILITYNAME},'%')
</if>
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''"><!-- 关键词检索-完成状态 -->
and c.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}
and COALESCE(c.COMPLETIONSTATUS, '0') = #{pd.COMPLETIONSTATUS}
</if>
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
and c.VALIDSTATUS = #{pd.VALIDSTATUS}
and COALESCE(c.VALIDSTATUS, '0') = #{pd.VALIDSTATUS}
</if>
</select>

View File

@ -23,6 +23,7 @@
f.PRACTITIONER,
f.ATTACHMENT_ROUTE,
f.USER_ID,
f.CONTENT,
f.ISDELETE,
f.DELETOR,
f.DELETORNAME,
@ -47,6 +48,7 @@
PRACTITIONER,
ATTACHMENT_ROUTE,
USER_ID,
CONTENT,
ISDELETE,
DELETOR,
DELETORNAME,
@ -71,6 +73,7 @@
#{PRACTITIONER},
#{ATTACHMENT_ROUTE},
#{USER_ID},
#{CONTENT},
#{ISDELETE},
#{DELETOR},
#{DELETORNAME},
@ -103,6 +106,7 @@
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
EXPIRYDATE = #{EXPIRYDATE},
CONTENT = #{CONTENT},
ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}
<if test="VALIDSTATUS != null">
, VALIDSTATUS = #{VALIDSTATUS}
@ -123,26 +127,8 @@
</delete>
<!--列表-->
<!-- <select id="datalistPage" parameterType="page" resultType="pd">-->
<!-- select-->
<!-- f.*,-->
<!-- i.CORP_NAME-->
<!-- from-->
<!-- <include refid="tableName"></include> f-->
<!-- left join bus_corp_info i on f.OPERATINGCOMPANY = i.CORPINFO_ID-->
<!-- where f.ISDELETE = '0'-->
<!-- <if test="pd.COMMITMENTNAME != null and pd.COMMITMENTNAME != ''">&lt;!&ndash; 关键词检索-制度名称 &ndash;&gt;-->
<!-- and f.COMMITMENTNAME like CONCAT('%',#{pd.COMMITMENTNAME},'%')-->
<!-- </if>-->
<!-- <if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''">&lt;!&ndash; 关键词检索-完成状态 &ndash;&gt;-->
<!-- and f.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}-->
<!-- </if>-->
<!-- <if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''">&lt;!&ndash; 关键词检索-有效状态 &ndash;&gt;
and f.VALIDSTATUS = #{pd.VALIDSTATUS}
</if>-->
<!-- </select>-->
<select id="datalistPage" parameterType="page" resultType="pd">
select
SELECT
u.NAME,
u.USER_ID,
i.CORP_NAME,
@ -152,22 +138,26 @@
c.EXPIRYDATE,
c.CREATETIME,
c.OPERATTIME,
c.CONTENT,
c.ISDELETE,
c.SECURITYCOMMITMENT_ID
from
FROM
sys_user u
left join bus_corp_info i on u.CORPINFO_ID = i.CORPINFO_ID
left join BUS_TRAFFIC_SECURITY_COMMITMENT c on u.USER_ID = c.USER_ID
where u.ISDELETE = '0'
and u.ISMAIN != '1'
and (c.VALIDSTATUS != '2' or c.VALIDSTATUS is null)
<if test="pd.COMMITMENTNAME != null and pd.COMMITMENTNAME != ''"><!-- 关键词检索-制度名称 -->
left JOIN bus_corp_info i ON u.CORPINFO_ID = i.CORPINFO_ID
left JOIN BUS_TRAFFIC_SECURITY_COMMITMENT c ON u.USER_ID = c.USER_ID and c.ISDELETE !='1'
WHERE
u.ISDELETE = '0'
and (c.ISDELETE='0' or c.ISDELETE is null )
AND u.ISMAIN != '1'
AND ( c.VALIDSTATUS != '2' OR c.VALIDSTATUS IS NULL )
<if test="pd.COMMITMENTNAME != null and pd.COMMITMENTNAME != ''">
and c.COMMITMENTNAME like CONCAT('%',#{pd.COMMITMENTNAME},'%')
</if>
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''"><!-- 关键词检索-完成状态 -->
and c.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''">
and COALESCE(c.COMPLETIONSTATUS, '0') = #{pd.COMPLETIONSTATUS}
</if>
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
and c.VALIDSTATUS = #{pd.VALIDSTATUS}
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''">
and COALESCE(c.VALIDSTATUS, '0') = #{pd.VALIDSTATUS}
</if>
</select>

View File

@ -22,6 +22,7 @@
f.PRACTITIONER,
f.ATTACHMENT_ROUTE,
f.USER_ID,
f.CONTENT,
f.ISDELETE,
f.DELETOR,
f.DELETORNAME,
@ -45,6 +46,7 @@
PRACTITIONER,
ATTACHMENT_ROUTE,
USER_ID,
CONTENT,
ISDELETE,
DELETOR,
DELETORNAME,
@ -68,6 +70,7 @@
#{PRACTITIONER},
#{ATTACHMENT_ROUTE},
#{USER_ID},
#{CONTENT},
#{ISDELETE},
#{DELETOR},
#{DELETORNAME},
@ -100,6 +103,7 @@
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
EXPIRYDATE = #{EXPIRYDATE},
CONTENT = #{CONTENT},
ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}
<if test="VALIDSTATUS != null">
, VALIDSTATUS = #{VALIDSTATUS}
@ -121,25 +125,6 @@
</delete>
<!--列表-->
<!-- <select id="datalistPage" parameterType="page" resultType="pd">-->
<!-- select-->
<!-- f.*,-->
<!-- i.CORP_NAME-->
<!-- from-->
<!-- <include refid="tableName"></include> f-->
<!-- left join bus_corp_info i on f.OPERATINGCOMPANY = i.CORPINFO_ID-->
<!-- where f.ISDELETE = '0'-->
<!-- <if test="pd.CONTRACTNAME != null and pd.CONTRACTNAME != ''">&lt;!&ndash; 关键词检索-制度名称 &ndash;&gt;-->
<!-- and f.CONTRACTNAME like CONCAT('%',#{pd.CONTRACTNAME},'%')-->
<!-- </if>-->
<!-- <if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''">&lt;!&ndash; 关键词检索-完成状态 &ndash;&gt;-->
<!-- and f.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}-->
<!-- </if>-->
<!-- <if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''">&lt;!&ndash; 关键词检索-有效状态 &ndash;&gt;-->
<!-- and f.VALIDSTATUS = #{pd.VALIDSTATUS}-->
<!-- </if>-->
<!-- </select>-->
<!--列表-->
<select id="datalistPage" parameterType="page" resultType="pd">
select
u.NAME,
@ -149,24 +134,25 @@
c.COMPLETIONSTATUS,
c.VALIDSTATUS,
c.EXPIRYDATE,
c.CONTENT,
c.CREATETIME,
c.OPERATTIME,
c.LABORCONTRACT_ID
from
sys_user u
left join bus_corp_info i on u.CORPINFO_ID = i.CORPINFO_ID
left join BUS_TRAFFIC_LABOR_CONTRACT c on u.USER_ID = c.USER_ID
left join BUS_TRAFFIC_LABOR_CONTRACT c on u.USER_ID = c.USER_ID and c.ISDELETE !='1'
where u.ISDELETE = '0'
and u.ISMAIN != '1'
and (c.VALIDSTATUS != '2' or c.VALIDSTATUS is null)
<if test="pd.CONTRACTNAME != null and pd.CONTRACTNAME != ''"><!-- 关键词检索 -->
and c.CONTRACTNAME like CONCAT('%',#{pd.CONTRACTNAME},'%')
</if>
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''"><!-- 关键词检索-完成状态 -->
and c.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''">
and COALESCE(c.COMPLETIONSTATUS, '0') = #{pd.COMPLETIONSTATUS}
</if>
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
and c.VALIDSTATUS = #{pd.VALIDSTATUS}
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''">
and COALESCE(c.VALIDSTATUS, '0') = #{pd.VALIDSTATUS}
</if>
</select>

View File

@ -240,4 +240,16 @@
</if>
</select>
<select id="listOut" parameterType="pd" resultType="pd">
select
<include refid="Field2"></include>,
from
<include refid="tableName"></include> f
inner join bus_corp_info b on f.CORPINFO_ID = b.CORPINFO_ID
where f.FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID}
<foreach item="item" index="index" open="(" separator="," close=")" collection="ArrayDATA_IDS">
#{item}
</foreach>
</select>
</mapper>