forked from integrated_whb/integrated_whb
交通一体化bug优化
parent
b5fa3fae2e
commit
4763b042a0
|
@ -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);
|
||||
|
|
|
@ -10,13 +10,18 @@ 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.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.*;
|
||||
|
||||
/**
|
||||
|
@ -192,6 +197,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())); // 修改时间
|
||||
|
|
|
@ -76,5 +76,7 @@ public interface FreightTrailerMapper {
|
|||
List<PageData> vehicleList(PageData pd);
|
||||
|
||||
List<PageData> listOut(PageData pd);
|
||||
|
||||
List<PageData> listAll(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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -350,6 +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.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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -148,22 +148,21 @@
|
|||
</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>
|
||||
<if test="pd.DISPOSE_STATUS != null and pd.DISPOSE_STATUS != ''"><!-- 关键词检索 -->
|
||||
and f.DISPOSE_STATUS = #{pd.DISPOSE_STATUS}
|
||||
</if>
|
||||
<if test="pd.REPORTED_DATE != null and pd.REPORTED_DATE != ''"><!-- 关键词检索 -->
|
||||
and f.REPORTED_DATE = #{pd.REPORTED_DATE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 所属企业列表 -->
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 OPERATTIME DESC
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
|
|
Loading…
Reference in New Issue