forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java # src/main/java/com/zcloud/service/system/UsersService.java # src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java # src/main/resources/mybatis/datasource/comprehensive/TrafficSecurityAccidentInvestigationMapper.xmldev
commit
56e76848cc
|
@ -46,12 +46,9 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //主键
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
pd.put("INQUIRYCONCLUSION","正常");
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //是否发送短信0不发1发
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername());
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //操作人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
|
||||
trafficDrivingCommitmentService.save(pd);
|
||||
|
||||
map.put("pd",pd);
|
||||
|
@ -80,8 +77,6 @@ public class TrafficDrivingCommitmentController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//列表
|
||||
@RequestMapping(value = "/listForSafetyDrivingCommitment")
|
||||
@ResponseBody
|
||||
|
|
|
@ -40,12 +40,9 @@ public class TrafficDrivingTypeController extends BaseController {
|
|||
pd.put("DRIVINGTYPE_ID", this.get32UUID());
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //主键
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //是否发送短信0不发1发
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername());
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //创建人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //操作人
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //操作人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //操作时间
|
||||
trafficDrivingTypeService.save(pd);
|
||||
|
||||
map.put("pd",pd);
|
||||
|
|
|
@ -50,9 +50,6 @@ public class FirefightingEquipmentFacilityController extends BaseController {
|
|||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
firefightingEquipmentFacilityService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -12,14 +12,19 @@ import com.zcloud.service.scrapManage.ScrapManageService;
|
|||
import com.zcloud.service.system.ImgFilesService;
|
||||
import com.zcloud.service.taxationManage.TaxationManageService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -202,6 +207,166 @@ public class FreighttTrailerController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**从EXCEL导入到数据库
|
||||
* @param file
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/readExcel")
|
||||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
@LogAnno(menuType= "双重预防",menuServer= "风险管控",instructionsOperate = "风险点(单元)",instructionsType = "上传附件")
|
||||
public Object readExcel(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
StringBuffer errorStr = new StringBuffer();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
File tempFile = new File(file.getOriginalFilename()); //新建file
|
||||
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); //将MultipartFile复制到File
|
||||
List<PageData> listPd = (List) ObjectExcelRead.readExcel(tempFile, 1, 0, 0); // 执行读EXCEL操作,读出的数据导入List
|
||||
// 2:从第3行开始;0:从第A列开始;0:第0个sheet
|
||||
/**
|
||||
* var0 :风险点(单元) var1 :所属部门
|
||||
*/
|
||||
|
||||
try {
|
||||
if (listPd.size() < 1) {
|
||||
map.put("result", "error"); // 返回结果
|
||||
map.put("resultStr", "Excel数据为空,请检查数据后,重新上传!");
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
return map;
|
||||
}
|
||||
List<PageData> riskunitList = new ArrayList<>();
|
||||
PageData pd = new PageData();
|
||||
pd.put("ISDELETE", "0");
|
||||
pd.put("BELONGING_DEPT", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> riskunitListAll = freightTrailerService.listAll(pd);
|
||||
Map<String, Object> riskunitMapAll = new HashMap<>();
|
||||
for (PageData pageData : riskunitListAll) {
|
||||
// 使用车牌号作为键
|
||||
String plateNumberKey = Tools.excelHandle(pageData.getString("PLATE_NUMBER"));
|
||||
riskunitMapAll.put(plateNumberKey, pageData);
|
||||
}
|
||||
List<String> header = new ArrayList<>();
|
||||
header.add("自编号");
|
||||
header.add("车牌号");
|
||||
header.add("车架号");
|
||||
header.add("车身编号");
|
||||
header.add("挂车类型");
|
||||
header.add("运营证号");
|
||||
header.add("归属部门");
|
||||
header.add("车主");
|
||||
header.add("车主电话");
|
||||
header.add("联系人");
|
||||
header.add("联系电话");
|
||||
header.add("初登日期");
|
||||
header.add("发证日期");
|
||||
header.add("到期日期");
|
||||
header.add("挂车品牌");
|
||||
header.add("挂车型号");
|
||||
header.add("核定总质量");
|
||||
header.add("核定载质量");
|
||||
header.add("容积");
|
||||
header.add("备注");
|
||||
Map<String, Object> hasRiskUnit = new HashMap<>();
|
||||
int succeeNum = 1;
|
||||
for (PageData lpd : listPd) {
|
||||
succeeNum++;
|
||||
convertExcelDate(lpd, "var11"); // 初登日期 INITIAL_REGISTRATION_DATE
|
||||
convertExcelDate(lpd, "var12"); // 发证日期 CERTIFICATE_DATE
|
||||
convertExcelDate(lpd, "var13"); // 到期日期 DUE_DATE
|
||||
System.out.println(lpd.get("var11")+"--"+lpd.get("var12")+"--"+lpd.get("var13"));
|
||||
for (int i = 0; i < header.size(); i++) {
|
||||
if (!lpd.containsKey("var" + i)) {
|
||||
errorStr.append("<p>第" + succeeNum + "行的\"" + header.get(i) + "\"无数据</p>");
|
||||
continue;
|
||||
}
|
||||
if (Tools.isEmpty(lpd.get("var" + i))) {
|
||||
errorStr.append("<p>第" + succeeNum + "行的\"" + header.get(i) + "\"无数据</p>");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
String plateNumberVar = Tools.isEmpty(lpd.get("var1")) ? "" : Tools.excelHandle(lpd.get("var1"));
|
||||
|
||||
if (riskunitMapAll.containsKey(plateNumberVar)) {
|
||||
errorStr.append("<p>第" + succeeNum + "行:" + "车牌号为\"" + plateNumberVar + "\"的记录已存在,请检查!" + "</p>");
|
||||
continue;
|
||||
}
|
||||
if (hasRiskUnit.containsKey(plateNumberVar)) {
|
||||
errorStr.append("<p>第" + succeeNum + "行:" + "车牌号重复,请重新检查内容!" + "</p>");
|
||||
continue;
|
||||
}
|
||||
hasRiskUnit.put(plateNumberVar, "1");
|
||||
PageData riskunit = new PageData();
|
||||
riskunit.put("NUM", lpd.get("var0"));
|
||||
riskunit.put("PLATE_NUMBER", lpd.get("var1"));
|
||||
riskunit.put("VIN", lpd.get("var2"));
|
||||
riskunit.put("VEHICLE_BODY_NUMBER", lpd.get("var3"));
|
||||
riskunit.put("TRAILER_TYPE", lpd.get("var4"));
|
||||
riskunit.put("OPER_CERTIFICATE_NUM", lpd.get("var5"));
|
||||
riskunit.put("BELONGING_DEPT", lpd.get("var6"));
|
||||
riskunit.put("CAR_OWNERS", lpd.get("var7"));
|
||||
riskunit.put("CAR_OWNERS_TEL", lpd.get("var8"));
|
||||
riskunit.put("CONTACTS", lpd.get("var9"));
|
||||
riskunit.put("CONTACT_PHONE", lpd.get("var10"));
|
||||
riskunit.put("INITIAL_REGISTRATION_DATE", lpd.get("var11"));
|
||||
riskunit.put("CERTIFICATE_DATE", lpd.get("var12"));
|
||||
riskunit.put("DUE_DATE", lpd.get("var13"));
|
||||
riskunit.put("TRAILER_BRAND", lpd.get("var14"));
|
||||
riskunit.put("TRAILER_MODEL", lpd.get("var15"));
|
||||
riskunit.put("APPROVED_TOTAL_MASS", lpd.get("var16"));
|
||||
riskunit.put("APPROVED_LOAD_CAPACITY", lpd.get("var17"));
|
||||
riskunit.put("VOLUME", lpd.get("var18"));
|
||||
riskunit.put("NOTES", lpd.get("var19"));
|
||||
riskunit.put("FREIGHTTRAILER_ID", this.get32UUID());
|
||||
riskunit.put("ISDELETE", "0");
|
||||
riskunit.put("CREATOR", Jurisdiction.getUsername());
|
||||
riskunit.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
riskunit.put("OPERATOR", Jurisdiction.getUsername());
|
||||
riskunit.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||
riskunit.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
riskunitList.add(riskunit);
|
||||
}
|
||||
if (Tools.isEmpty(errorStr.toString())) {
|
||||
for (PageData riskunit : riskunitList) {
|
||||
freightTrailerService.save(riskunit);
|
||||
}
|
||||
errorStr.append("成功导入" + riskunitList.size() + "条数据!");
|
||||
} else {
|
||||
errInfo = "error";
|
||||
}
|
||||
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
} catch (Exception e) {
|
||||
map.put("result", "fail"); // 返回结果
|
||||
map.put("resultStr", errorStr.toString());
|
||||
FileUtils.deleteQuietly(tempFile);//删除临时文件
|
||||
return map;
|
||||
}
|
||||
}
|
||||
map.put("result", "success");//返回结果
|
||||
map.put("resultType", errInfo);//返回message类型
|
||||
map.put("isExcel","1");//返回类型
|
||||
map.put("resultStr", errorStr.toString());
|
||||
return map;
|
||||
}
|
||||
|
||||
private void convertExcelDate(PageData lpd, String field) {
|
||||
Object excelDateObj = lpd.get(field);
|
||||
if (excelDateObj != null) {
|
||||
// 尝试将对象转换为Double,因为Excel中的日期是以Double类型的数字存储的
|
||||
double excelDate = Double.parseDouble(excelDateObj.toString());
|
||||
// 使用Apache POI的DateUtil获取Java日期对象
|
||||
Date javaDate = org.apache.poi.ss.usermodel.DateUtil.getJavaDate(excelDate);
|
||||
// 使用您的DateUtil工具类进行日期格式化
|
||||
String formattedDate = DateUtil.date2Str(javaDate, "yyyy-MM-dd");
|
||||
// 更新lpd对象中的日期字段
|
||||
lpd.put(field, formattedDate);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
|
|
|
@ -46,9 +46,6 @@ public class LabourEntrenchThingController extends BaseController {
|
|||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
labourEntrenchThingService.save(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
@ -87,9 +84,6 @@ public class LabourEntrenchThingController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
|
||||
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
|
|
|
@ -97,6 +97,27 @@ public class UsersController extends BaseController {
|
|||
return ReturnMap.ok().put("pd", usersService.getUserByCardNo(pageData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据USERID找人
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/getUserByUserId")
|
||||
@ResponseBody
|
||||
public Object getUserByUserId() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd = usersService.getUserByUserId(pd);
|
||||
map.put("pd",pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
// PageData pageData = getPageData();
|
||||
// pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户列表
|
||||
*
|
||||
|
|
|
@ -76,5 +76,7 @@ public interface FreightTrailerMapper {
|
|||
List<PageData> vehicleList(PageData pd);
|
||||
|
||||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -295,4 +295,6 @@ public interface UsersMapper {
|
|||
void editPractitioner(PageData pd);
|
||||
|
||||
List<PageData> userSelectPersonTypelist(PageData pd);
|
||||
|
||||
PageData getUserByUserId(PageData pd);
|
||||
}
|
||||
|
|
|
@ -76,5 +76,7 @@ public interface FreightTrailerService {
|
|||
public List<PageData> vehicleList(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,5 +108,10 @@ public class FreightTrailerServiceImpl implements FreightTrailerService {
|
|||
return freightTrailerMapper.listOut(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAll(PageData pd) {
|
||||
return freightTrailerMapper.listAll(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -368,4 +368,6 @@ public interface UsersService {
|
|||
void setPractitionerConfirm(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> userSelectPersonTypelist(PageData pd);
|
||||
|
||||
PageData getUserByUserId(PageData pd);
|
||||
}
|
||||
|
|
|
@ -1333,4 +1333,10 @@ public class UsersServiceImpl implements UsersService {
|
|||
public List<PageData> userSelectPersonTypelist(PageData pd) {
|
||||
return usersMapper.userSelectPersonTypelist(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getUserByUserId(PageData pd) {
|
||||
return usersMapper.getUserByUserId(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -891,4 +891,5 @@ public class DateUtil {
|
|||
}
|
||||
return new Date();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<if test="pd.INQUIRYCONTENT != null and pd.INQUIRYCONTENT != ''"><!-- 关键词检索 -->
|
||||
and f.INQUIRYCONTENT LIKE CONCAT(CONCAT('%', #{pd.INQUIRYCONTENT}),'%')
|
||||
</if>
|
||||
order by f.OPERATTIME DESC
|
||||
order by f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<select id="getDrivingCommitment" parameterType="page" resultType="pd">
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<if test="pd.CHECKTYPE_ID != null and pd.CHECKTYPE_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CHECKTYPE_ID = #{pd.CHECKTYPE_ID}
|
||||
</if>
|
||||
order by f.OPERATTIME DESC
|
||||
order by f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="pd">
|
||||
|
|
|
@ -133,6 +133,7 @@
|
|||
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
|
||||
and f.VALIDSTATUS = #{pd.VALIDSTATUS}
|
||||
</if>
|
||||
ORDER BY f.CREATETIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
|
||||
and f.VALIDSTATUS = #{pd.VALIDSTATUS}
|
||||
</if>
|
||||
ORDER BY f.CREATETIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
|
||||
|
|
|
@ -141,13 +141,16 @@
|
|||
select
|
||||
<include refid="Field"></include>,
|
||||
u.NAME,
|
||||
u.USERNAME
|
||||
u.USERNAME,
|
||||
sd.NAME as DICTIONARIES_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
join sys_user u on f.PRACTITIONER = u.USER_ID
|
||||
left join sys_user u on f.PRACTITIONER = u.USER_ID
|
||||
left join sys_userinfo ui on f.PRACTITIONER = ui.USER_ID
|
||||
left join sys_dictionaries sd on ui.PERSONNEL_TYPE = sd.DICTIONARIES_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.PRACTITIONER = #{pd.PRACTITIONER}
|
||||
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''">
|
||||
and u.NAME = #{pd.PRACTITIONER}
|
||||
</if>
|
||||
<if test="pd.PRACTITIONER_TYPE != null and pd.PRACTITIONER_TYPE != ''"><!-- 关键词检索-从业类型 -->
|
||||
and f.PRACTITIONER_TYPE = #{pd.PRACTITIONER_TYPE}
|
||||
|
|
|
@ -349,15 +349,16 @@
|
|||
<if test="pd.ACCIDENTDATE != null and pd.ACCIDENTDATE != ''"><!-- 检索-处罚时间 -->
|
||||
and f.ACCIDENTDATE = #{pd.ACCIDENTDATE}
|
||||
</if>
|
||||
ORDER BY f.OPERATTIME DESC
|
||||
|
||||
ORDER BY f.CREATETIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
<include refid="Field"></include>,
|
||||
i.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.DEPARTMENT = i.CORPINFO_ID
|
||||
where
|
||||
f.ACCIDENTINVESTIGATION_ID = #{ACCIDENTINVESTIGATION_ID}
|
||||
</select>
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
and f.CUSTOMERTYPE = #{pd.CUSTOMERTYPE}
|
||||
</if>
|
||||
<if test="pd.TRANSPORTATIONCOMPANY != null and pd.TRANSPORTATIONCOMPANY != ''"><!-- 关键词检索-运输企业 -->
|
||||
and f.TRANSPORTATIONCOMPANY = #{pd.TRANSPORTATIONCOMPANY}
|
||||
and i.CORP_NAME = #{pd.TRANSPORTATIONCOMPANY}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
and f.LOCATIONTYPE = #{pd.LOCATIONTYPE}
|
||||
</if>
|
||||
<if test="pd.TRANSPORTATIONCOMPANY != null and pd.TRANSPORTATIONCOMPANY != ''"><!-- 关键词检索-运输企业 -->
|
||||
and f.TRANSPORTATIONCOMPANY = #{pd.TRANSPORTATIONCOMPANY}
|
||||
and i.CORP_NAME = #{pd.TRANSPORTATIONCOMPANY}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -149,6 +149,7 @@
|
|||
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.PRACTITIONER = #{pd.PRACTITIONER}
|
||||
</if>
|
||||
ORDER BY f.CREATETIME DESC
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
|
||||
|
|
|
@ -163,8 +163,8 @@
|
|||
b2.LOCATIONNAME AS DESTINATION_NAME,
|
||||
c.CUSTOMERNAME AS CLIENT_NAME,
|
||||
c2.CUSTOMERNAME AS CONFIRMER_NAME,
|
||||
t.OPERATTIME as STARTTIME,
|
||||
p.OPERATTIME as STOPTIME
|
||||
t.OPERATTIME AS STARTTIME,
|
||||
p.OPERATTIME AS STOPTIME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
|
|
|
@ -350,7 +350,7 @@
|
|||
<if test="pd.FACILITY_LOCALTION != null and pd.FACILITY_LOCALTION != ''"><!-- 关键词检索 -->
|
||||
and f.FACILITY_LOCALTION LIKE CONCAT(CONCAT('%', #{pd.FACILITY_LOCALTION}),'%')
|
||||
</if>
|
||||
ORDER BY f.OPERATTIME DESC
|
||||
ORDER BY f.CREATTIME desc
|
||||
</select>
|
||||
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
|
|
|
@ -251,5 +251,12 @@
|
|||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="listAll" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
v1.PLATE_NUMBER
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join sys_dictionaries b on f.ANNUAL_INSPECTION_CYCLE = b.DICTIONARIES_ID
|
||||
left join sys_dictionaries b on f.ANNUAL_INSPECTION_CYCLE = b.DICTIONARIES_ID AND b.PARENT_ID = '8b7dea3977fd4360a3cc8112368b90ff'
|
||||
INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID
|
||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.PLATE_NUMBER != null and pd.PLATE_NUMBER != ''">
|
||||
|
|
|
@ -350,6 +350,7 @@
|
|||
<if test="pd.PERSON_NAME != null and pd.PERSON_NAME != ''"><!-- 关键词检索 -->
|
||||
and f.PERSON_NAME LIKE CONCAT(CONCAT('%', #{pd.PERSON_NAME}),'%')
|
||||
</if>
|
||||
ORDER BY f.CREATTIME desc
|
||||
</select>
|
||||
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
when bta.RAW_PLATE_NUMBER is not null then '2'
|
||||
else f.ARCHIVES_TYPE
|
||||
end as NEW_ARCHIVES_TYPE,
|
||||
COALESCE((SELECT sd.NAME FROM sys_dictionaries sd WHERE sd.DICTIONARIES_ID=f.CYCLE), '0') as CYCLE_NAME,
|
||||
COALESCE((SELECT sd.NAME FROM sys_dictionaries sd WHERE sd.DICTIONARIES_ID=f.CYCLE AND sd.PARENT_ID='8b7dea3977fd4360a3cc8112368b90ff'), '0') as CYCLE_NAME,
|
||||
COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
|
|
|
@ -147,13 +147,16 @@
|
|||
f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.REPORTED_DATE != null and pd.REPORTED_DATE != ''">
|
||||
and f.REPORTED_DATE = #{pd.REPORTED_DATE}
|
||||
</if>
|
||||
<if test="pd.REPORTPERSON != null and pd.REPORTPERSON != ''"><!-- 关键词检索 -->
|
||||
and f.REPORTPERSON LIKE CONCAT(CONCAT('%', #{pd.REPORTPERSON}),'%')
|
||||
</if>
|
||||
|
|
|
@ -464,59 +464,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 用户列表 -->
|
||||
<select id="userSelectlistPage" parameterType="page" resultType="pd" >
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.SEX,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
u.ISMAIN,
|
||||
u.PUSH_CID,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
p.NAME AS POST_NAME
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.SEX,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
u.ISMAIN,
|
||||
u.PUSH_CID,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
p.NAME AS POST_NAME,
|
||||
c.PERSONNEL_TYPE,
|
||||
sd.NAME AS PERSONNEL_TYPE_NAME -- 添加的字段,表示人员类型名称
|
||||
from <include refid="tableName"></include> u
|
||||
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
|
||||
left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
|
||||
left join SYS_POST p on p.POST_ID=u.POST_ID
|
||||
left join SYS_USERINFO c on c.USER_ID=u.USER_ID
|
||||
left join sys_dictionaries sd on sd.DICTIONARIES_ID = c.PERSONNEL_TYPE AND sd.PARENT_ID = '0b62f92b0b624aab8e89a77304a64d5e'
|
||||
where
|
||||
u.ISDELETE = 0 and
|
||||
u.USERNAME != 'admin'
|
||||
<if test="pd.KEYWORDS!= null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
d.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
)
|
||||
</if>
|
||||
<if test="pd.ROLE_ID != null and pd.ROLE_ID != ''"> <!-- 角色检索 -->
|
||||
<if test="pd.ROLE_ID != null and pd.ROLE_ID != ''"> <!-- 角色检索 -->
|
||||
and u.ROLE_ID=#{pd.ROLE_ID}
|
||||
</if>
|
||||
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''"> <!-- 角色检索 -->
|
||||
<if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''"> <!-- 角色检索 -->
|
||||
and u.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
|
||||
</if>
|
||||
<if test="pd.STARTTIME!=null and pd.STARTTIME!=''"> <!-- 登录时间检索 -->
|
||||
<if test="pd.STARTTIME!=null and pd.STARTTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN >= #{pd.STARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME!=null and pd.ENDTIME!=''"> <!-- 登录时间检索 -->
|
||||
<if test="pd.ENDTIME!=null and pd.ENDTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN <= #{pd.ENDTIME}
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
AND
|
||||
u.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
u.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
order by d.LEVEL asc ,d.DEP_ORDER,d.DEPARTMENT_ID asc, u.SORT asc,u.USER_ID
|
||||
</select>
|
||||
|
@ -1796,6 +1800,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by u.SORT asc,u.LAST_LOGIN desc
|
||||
</select>
|
||||
|
||||
<select id="getUserByUserId" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.USER_ID = #{USER_ID}
|
||||
</select>
|
||||
|
||||
<!-- 从业人员入职审核 -->
|
||||
<update id="setPractitionerReview" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
|
|
|
@ -445,8 +445,7 @@
|
|||
<if test="pd.TRANSPORT_ENTERPRISES != null and pd.TRANSPORT_ENTERPRISES != ''">
|
||||
AND f.TRANSPORT_ENTERPRISES = #{pd.TRANSPORT_ENTERPRISES}
|
||||
</if>
|
||||
ORDER BY f.OPERATTIME DESC
|
||||
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
|
|
Loading…
Reference in New Issue