Commit 5151acb3 authored by huyuchen's avatar huyuchen

法大大代码提交

parent e4901d56
...@@ -41,6 +41,7 @@ import org.apache.commons.fileupload.FileItemFactory; ...@@ -41,6 +41,7 @@ import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartFile;
...@@ -87,6 +88,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM ...@@ -87,6 +88,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
* @date: 2022/6/27 * @date: 2022/6/27
*/ */
@Override @Override
@Transactional
public R importZip(MultipartFile zipFile){ public R importZip(MultipartFile zipFile){
try { try {
String pathName = System.getProperty("java.io.tmpdir"); String pathName = System.getProperty("java.io.tmpdir");
......
...@@ -64,18 +64,6 @@ ...@@ -64,18 +64,6 @@
<if test="tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''"> <if test="tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard} AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard}
</if> </if>
<if test="tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''">
AND c.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
</if>
<if test="tElecEmployeeInfo.deptName != null and tElecEmployeeInfo.deptName.trim() != ''">
AND c.DEPT_NAME like concat('%',#{tElecEmployeeInfo.deptName},'%')
</if>
<if test="tElecEmployeeInfo.empNo != null and tElecEmployeeInfo.empNo.trim() != ''">
AND c.EMP_NO = #{tElecEmployeeInfo.empNo}
</if>
<if test="tElecEmployeeInfo.deptNo != null and tElecEmployeeInfo.deptNo.trim() != ''">
AND c.DEPT_NO like concat('%',#{tElecEmployeeInfo.deptNo},'%')
</if>
<if test="tElecEmployeeInfo.dataType != null and tElecEmployeeInfo.dataType.trim() != ''"> <if test="tElecEmployeeInfo.dataType != null and tElecEmployeeInfo.dataType.trim() != ''">
AND a.DATA_TYPE = #{tElecEmployeeInfo.dataType} AND a.DATA_TYPE = #{tElecEmployeeInfo.dataType}
</if> </if>
...@@ -99,16 +87,29 @@ ...@@ -99,16 +87,29 @@
<!--tElecEmployeeInfo简单分页查询--> <!--tElecEmployeeInfo简单分页查询-->
<select id="getTElecEmployeeInfoPage" resultMap="tElecEmployeeInfoMap"> <select id="getTElecEmployeeInfoPage" resultMap="tElecEmployeeInfoMap">
SELECT SELECT * from (
<include refid="Base_Column_List"/>,GROUP_CONCAT(distinct c.DEPT_NAME) as DEPT_NAME,GROUP_CONCAT(distinct c.UNIT_NAME) as UNIT_NAME,GROUP_CONCAT(distinct c.DEPT_NO) as DEPT_NO,GROUP_CONCAT(distinct c.EMP_NO) as EMP_NO SELECT
FROM t_elec_employee_info a <include refid="Base_Column_List"/>,GROUP_CONCAT(distinct c.DEPT_NAME) as DEPT_NAME,GROUP_CONCAT(distinct c.UNIT_NAME) as UNIT_NAME,GROUP_CONCAT(distinct c.DEPT_NO) as DEPT_NO,GROUP_CONCAT(distinct c.EMP_NO) as EMP_NO
left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD FROM t_elec_employee_info a
left join t_employee_project c on a.EMP_IDCARD = c.EMP_IDCARD AND c.DELETE_FLAG = '0' AND c.PROJECT_STATUS = '0' left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
<where> left join t_employee_project c on a.EMP_IDCARD = c.EMP_IDCARD AND c.DELETE_FLAG = '0' AND c.PROJECT_STATUS = '0'
1=1 AND a.DELETE_FLAG = '0' WHERE a.DELETE_FLAG = '0'
<include refid="tElecEmployeeInfo_where"/> <include refid="tElecEmployeeInfo_where"/>
</where> GROUP BY a.EMP_IDCARD,a.CREATE_TIME,a.DATA_TYPE
GROUP BY a.EMP_IDCARD,a.CREATE_TIME,a.DATA_TYPE ORDER BY a.CREATE_TIME desc
ORDER BY a.CREATE_TIME desc ) b
where 1=1
<if test="tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''">
AND b.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
</if>
<if test="tElecEmployeeInfo.deptName != null and tElecEmployeeInfo.deptName.trim() != ''">
AND b.DEPT_NAME like concat('%',#{tElecEmployeeInfo.deptName},'%')
</if>
<if test="tElecEmployeeInfo.deptNo != null and tElecEmployeeInfo.deptNo.trim() != ''">
AND b.DEPT_NO like concat('%',#{tElecEmployeeInfo.deptNo},'%')
</if>
<if test="tElecEmployeeInfo.empNo != null and tElecEmployeeInfo.empNo.trim() != ''">
AND b.EMP_NO like concat('%',#{tElecEmployeeInfo.empNo},'%')
</if>
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment