Przeglądaj źródła

部门就餐详情加工号
月报表中查询外勤人员

zhengqiang 4 lat temu
rodzic
commit
4cf3cdc87c

+ 4 - 9
common/src/main/resources/mapper/base/BusinessOut.xml

@@ -278,17 +278,12 @@
                 and e.code_ like #{searchParams.hqCompanyCode}
             </if>
             <if test="searchParams.hqStatus != null">
-                and c.id_ in(
-                select person_id from base_hq_person
-                where hq_status=#{searchParams.hqStatus}
-                and del_flag=0
-                )
+                and c.hq_status = #{searchParams.hqStatus}
             </if>
             <if test="searchParams.hqStatus == null and searchParams.hqPerson != null">
-                and c.id_ in(
-                select person_id from base_hq_person
-                where del_flag=0
-                )
+                <![CDATA[
+					and ifnull(c.hq_status,0)<>0
+				]]>
             </if>
         </where>
         <foreach item="sort" collection="sortList" open="order by" separator=",">

+ 3 - 4
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -420,10 +420,9 @@
                 and a.hq_status = #{searchParams.hqStatus}
             </if>
             <if test="searchParams.querHq != null">
-                and a.id_ in(
-                select person_id from base_hq_person
-                where del_flag=0
-                )
+                <![CDATA[
+					and ifnull(a.hq_status,0)<>0
+				]]>
             </if>
             <if test="searchParams.popedomList != null">
                 <foreach item="popedom" collection="searchParams.popedomList" open="and a.popedom_ in (" separator="," close=")">

+ 5 - 11
common/src/main/resources/mapper/base/WorkOver.xml

@@ -229,19 +229,13 @@
 				and g.code_ like #{searchParams.hqCompanyCode}
 			</if>
 			<if test="searchParams.hqStatus != null">
-				and c.id_ in(
-				select person_id from base_hq_person
-				where hq_status=#{searchParams.hqStatus}
-				and del_flag=0
-				)
-			</if>
+			and c.hq_status = #{searchParams.hqStatus}
+		</if>
 			<if test="searchParams.hqStatus == null and searchParams.hqPerson != null">
-				and c.id_ in(
-				select person_id from base_hq_person
-				where del_flag=0
-				)
+				<![CDATA[
+					and ifnull(c.hq_status,0)<>0
+				]]>
 			</if>
-
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 4 - 9
common/src/main/resources/mapper/business/RequestForLeaveInfo.xml

@@ -303,17 +303,12 @@
 				and d.code_ like #{searchParams.hqCompanyCode}
 			</if>
 			<if test="searchParams.hqStatus != null">
-				and b.id_ in(
-					select person_id from base_hq_person
-					where hq_status=#{searchParams.hqStatus}
-					and del_flag=0
-				)
+				and b.hq_status = #{searchParams.hqStatus}
 			</if>
 			<if test="searchParams.hqStatus == null and searchParams.hqPerson != null">
-				and b.id_ in(
-				select person_id from base_hq_person
-				where del_flag=0
-				)
+				<![CDATA[
+					and ifnull(b.hq_status,0)<>0
+				]]>
 			</if>
 			<if test="searchParams.personInfoList != null ">
 				<foreach collection="searchParams.personInfoList" item="item" index="index" open="and b.id_ in(" separator="," close=")">

+ 4 - 9
common/src/main/resources/mapper/business/SupplementWork.xml

@@ -157,17 +157,12 @@
                 and t4.code_ like #{searchParams.hqCompanyCode}
             </if>
             <if test="searchParams.hqStatus != null">
-                and t3.id_ in(
-                select person_id from base_hq_person
-                where hq_status=#{searchParams.hqStatus}
-                and del_flag=0
-                )
+                and t3.hq_status = #{searchParams.hqStatus}
             </if>
             <if test="searchParams.hqStatus == null and searchParams.hqPerson != null">
-                and t3.id_ in(
-                select person_id from base_hq_person
-                where del_flag=0
-                )
+                <![CDATA[
+					and ifnull(t3.hq_status,0)<>0
+				]]>
             </if>
         </where>
         <foreach item="sort" collection="sortList" open="order by" separator=",">

+ 4 - 5
web/src/main/java/com/jpsoft/shinestar/modules/base/controller/CanteenDiningRecordController.java

@@ -8,14 +8,13 @@ import com.jpsoft.shinestar.modules.common.dto.MessageResult;
 import com.jpsoft.shinestar.modules.common.dto.Sort;
 import com.jpsoft.shinestar.modules.common.utils.OSSUtil;
 import com.jpsoft.shinestar.modules.common.utils.PojoUtils;
-import com.jpsoft.shinestar.modules.sys.entity.DataDictionary;
+import com.jpsoft.shinestar.modules.common.utils.StringUtils;
 import com.jpsoft.shinestar.modules.sys.entity.User;
 import com.jpsoft.shinestar.modules.sys.service.DataDictionaryService;
 import com.jpsoft.shinestar.modules.sys.service.UserCompanyService;
 import com.jpsoft.shinestar.modules.sys.service.UserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -503,8 +502,7 @@ public class CanteenDiningRecordController {
         //表头
         Row rowTitle = sheet.createRow(0);
 
-        String[] titles = new String[]{"序号","部门","工号","姓名","时间","餐别",
-                "地点"};
+        String[] titles = new String[]{"序号","部门","工号","姓名","时间","餐别","地点"};
 
         for (int i=0;i<titles.length;i++) {
             Cell cell = rowTitle.createCell(i);
@@ -958,7 +956,7 @@ public class CanteenDiningRecordController {
         //表头
         Row rowTitle = sheet.createRow(0);
 
-        String[] titles = new String[]{"序号","部门名称","姓名","中餐就餐总数","晚餐就餐总数","宵夜就餐总数","就餐总次数"};
+        String[] titles = new String[]{"序号","部门名称","工号","姓名","中餐就餐总数","晚餐就餐总数","宵夜就餐总数","就餐总次数"};
 
         for (int i=0;i<titles.length;i++) {
             Cell cell = rowTitle.createCell(i);
@@ -974,6 +972,7 @@ public class CanteenDiningRecordController {
             row.createCell(colIndex++).setCellValue(i+1);
             row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("companyName"),""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("name_"),""));
+            row.createCell(colIndex++).setCellValue(StringUtils.strValue(map.get("job_number"),""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("lunch"),""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("supper"),""));
             row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("nightSnack"),""));

+ 4 - 6
web/src/main/java/com/jpsoft/shinestar/modules/business/controller/WorkScheduleAttendanceController.java

@@ -450,15 +450,13 @@ public class WorkScheduleAttendanceController {
             if (StringUtils.isNotEmpty(companyId)) {
                 if("hq1".equals(companyId)){
                     //外勤1
-                    List<CompanyInfo> list1 = companyInfoService.findByClassify("1");
-                    searchParams.put("companyInfos", list1);
-
+//                    List<CompanyInfo> list1 = companyInfoService.findByClassify("1");
+//                    searchParams.put("companyInfos", list1);
                     searchParams.put("hqStatus", "1");
                 }else if("hq2".equals(companyId)){
                     //外勤2
-                    List<CompanyInfo> list2 = companyInfoService.findByClassify("2");
-                    searchParams.put("companyInfos", list2);
-
+//                    List<CompanyInfo> list2 = companyInfoService.findByClassify("2");
+//                    searchParams.put("companyInfos", list2);
                     searchParams.put("hqStatus", "2");
                 }else {
                     CompanyInfo parentCompanyInfo = companyInfoService.get(companyId);