Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

zhengqiang 4 rokov pred
rodič
commit
4f556f93ec

+ 0 - 10
common/src/main/resources/mapper/base/CanteenDiningRecord.xml

@@ -269,16 +269,6 @@
 			left join base_device_info c on c.id_=b.device_id
 		<where>
 			a.del_flag = false and b.del_flag = false and c.del_flag=false
-			<if test="searchParams.beginTime != null">
-				<![CDATA[
-                  and a.record_time >= #{searchParams.beginTime}
-                ]]>
-			</if>
-			<if test="searchParams.endTime != null">
-				<![CDATA[
-                  and a.record_time <= #{searchParams.endTime}
-                ]]>
-			</if>
 			GROUP BY a.id_
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">

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

@@ -774,7 +774,7 @@ public class CanteenDiningRecordController {
             Map<String, Object> searchParams = new HashMap<>();
 
             List<Sort> sortList = new ArrayList<>();
-            sortList.add(new Sort("c.create_time", "desc"));
+            sortList.add(new Sort("a.create_time", "desc"));
 
             if (StringUtils.isNotEmpty(companyId)) {
                 searchParams.put("companyId", "%"+companyId+"%");

+ 12 - 2
web/src/main/java/com/jpsoft/shinestar/modules/mobile/controller/AdjustShiftApiController.java

@@ -186,13 +186,23 @@ public class AdjustShiftApiController {
             PersonPopedom personPopedom = personPopedomService.get(person.getPopedom());
             CompanyInfo companyInfo = companyInfoService.get(personPopedom.getCompanyId());
 
-            List<CompanyInfo> companyInfoList =  companyInfoService.findAllCompanyByCode("%"+companyInfo.getId()+"%");
+            List<CompanyInfo> companyInfoList =  companyInfoService.findAllCompanyByCode(companyInfo.getCode()+"%");
+            List<String> companyIdList = Arrays.asList(companyInfo.getCode().split(","));
+            if (companyIdList.size()>0){
+                for (String id : companyIdList){
+                    CompanyInfo companyInfo1 = companyInfoService.get(id);
+                    if (!companyInfoList.contains(companyInfo1)){
+                        companyInfoList.add(companyInfo1);
+                    }
+                }
+            }
+
 
             Map<String, Object> searchParams = new HashMap<>();
             searchParams.put("inCompanyId", companyInfoList);
             List<Sort> sortList = new ArrayList<>();
             sortList.add(new Sort("b.number_", "asc"));
-            Page<WorkShiftCompany> page = workShiftCompanyService.pageSearch(searchParams, pageIndex, 100, true, sortList);
+            Page<WorkShiftCompany> page = workShiftCompanyService.pageSearch(searchParams, pageIndex, 10000, true, sortList);
 
             List<WorkShiftCompany> workShiftCompanyList = page.getResult();
             List<OwnerShiftDTO> list = new ArrayList<>();