diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java index 32a4eb56..3975dcda 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java @@ -167,7 +167,7 @@ public class AppSafetyEnvironmentalController extends BaseController { */ @RequestMapping(value="/edit") @ResponseBody - @DockAnnotation + @DockAnnotation(hasAnnex = true) public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -178,6 +178,7 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人 String ffile = DateUtil.getDays(); + ArrayList strings = new ArrayList<>(); if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){ String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) { @@ -191,9 +192,11 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); + strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName); } List hiddenList = safetyenvironmentalService.edit(pd); pd.put("hiddenList", hiddenList); + map.put("sendPicturesList", JSON.toJSONString(strings)); map.put("pd", pd); map.put("result", errInfo); map.put("dockData", JSON.toJSONString(pd)); diff --git a/src/main/java/com/zcloud/controller/bus/CorpPromiseController.java b/src/main/java/com/zcloud/controller/bus/CorpPromiseController.java index 5e2a9df1..b9af1250 100644 --- a/src/main/java/com/zcloud/controller/bus/CorpPromiseController.java +++ b/src/main/java/com/zcloud/controller/bus/CorpPromiseController.java @@ -88,20 +88,21 @@ public class CorpPromiseController extends BaseController { if (people.size() > 0) { //承诺人数据 int num = 0; for (int i = 0; i < people.size(); i++) { - PageData promise = new PageData(); - promise.put("PROMISE_ID", pd.getString("PROMISE_ID")); //外键ID - promise.put("DEPARTMENT_ID", people.get(i).get("DEPARTMENT_ID")); - promise.put("POST_ID", people.get(i).get("POST_ID")); List user = (List) people.get(i).get("USER_ID"); //同部门、同岗位下有可能选择多个人 - promise.put("ISSIGN", 0); if (user.size() > 0) { for (int j = 0; j < user.size(); j++) { - promise.put("USER_ID", user.get(j)); - promise.put("PROMISEPEOPLE_ID", this.get32UUID()); //主键 - promise.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - promise.put("ISPROMISE_PEOPLE", "0"); - corpPromisePeopleService.save(promise); - corpPromisePeoples.add(promise); + PageData peo = new PageData(); + peo.put("ISSIGN", 0); + peo.put("PROMISE_ID", pd.getString("PROMISE_ID")); //外键ID + peo.put("DEPARTMENT_ID",people.get(i).get("DEPARTMENT_ID")); + peo.put("POST_ID",people.get(i).get("POST_ID")); + peo.put("USER_ID",user.get(j)); + peo.put("ISSIGN",0); + peo.put("PROMISEPEOPLE_ID", this.get32UUID()); //主键 + peo.put("CORPINFO_ID",people.get(i).get("CORPINFO_ID")); + peo.put("ISPROMISE_PEOPLE","1"); + corpPromisePeopleService.save(peo); + corpPromisePeoples.add(peo); num++; } dockData.put("corpPromisePeopleSave",JSON.toJSONString(corpPromisePeoples)); @@ -114,20 +115,21 @@ public class CorpPromiseController extends BaseController { List coverpeople = (List) JSON.parse(pd.getString("coverpeople")); if (coverpeople.size() > 0) { //被承诺人数据 for (int i = 0; i < coverpeople.size(); i++) { - PageData promise = new PageData(); - promise.put("PROMISE_ID", pd.getString("PROMISE_ID")); //外键ID - promise.put("DEPARTMENT_ID", coverpeople.get(i).get("DEPARTMENT_ID")); - promise.put("POST_ID", coverpeople.get(i).get("POST_ID")); List user = (List) coverpeople.get(i).get("USER_ID"); //同部门、同岗位下有可能选择多个人 - promise.put("ISSIGN", 0); if (user.size() > 0) { for (int j = 0; j < user.size(); j++) { - promise.put("USER_ID", user.get(j)); - promise.put("PROMISEPEOPLE_ID", this.get32UUID()); //主键 - promise.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - promise.put("ISPROMISE_PEOPLE", "1"); - corpPromisePeopleService.save(promise); - coverPeoples.add(promise); + PageData peo = new PageData(); + peo.put("ISSIGN", 0); + peo.put("PROMISE_ID", pd.getString("PROMISE_ID")); //外键ID + peo.put("DEPARTMENT_ID",people.get(i).get("DEPARTMENT_ID")); + peo.put("POST_ID",people.get(i).get("POST_ID")); + peo.put("USER_ID",user.get(j)); + peo.put("ISSIGN",0); + peo.put("PROMISEPEOPLE_ID", this.get32UUID()); //主键 + peo.put("CORPINFO_ID",people.get(i).get("CORPINFO_ID")); + peo.put("ISPROMISE_PEOPLE","1"); + corpPromisePeopleService.save(peo); + coverPeoples.add(peo); } dockData.put("coverPeopleList",JSON.toJSONString(coverPeoples)); } diff --git a/src/main/java/com/zcloud/controller/corpsystem/CorpRoleController.java b/src/main/java/com/zcloud/controller/corpsystem/CorpRoleController.java index 98b0d753..4119a8ff 100644 --- a/src/main/java/com/zcloud/controller/corpsystem/CorpRoleController.java +++ b/src/main/java/com/zcloud/controller/corpsystem/CorpRoleController.java @@ -1,7 +1,6 @@ package com.zcloud.controller.corpsystem; import com.alibaba.fastjson.JSON; -import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -81,7 +80,6 @@ public class CorpRoleController extends BaseController { */ @RequestMapping(value="/add") @ResponseBody - @DockAnnotation(isAdd = true) public Object add()throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -135,7 +133,6 @@ public class CorpRoleController extends BaseController { */ @RequestMapping(value="/edit") @ResponseBody - @DockAnnotation public Object edit()throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -155,7 +152,6 @@ public class CorpRoleController extends BaseController { */ @RequestMapping(value="/delete") @ResponseBody - @DockAnnotation(isAdd = true) public Object deleteRole(@RequestParam String ROLE_ID)throws Exception{ Map map = new HashMap(); PageData pd = new PageData(); @@ -224,7 +220,6 @@ public class CorpRoleController extends BaseController { */ @RequestMapping(value="/saveMenuqx") @ResponseBody - @DockAnnotation(isAdd = true) public Object saveMenuqx(@RequestParam String ROLE_ID,@RequestParam String menuIds)throws Exception{ Map map = new HashMap(); PageData pd = new PageData(); @@ -291,7 +286,6 @@ public class CorpRoleController extends BaseController { */ @RequestMapping(value="/saveB4Button") @ResponseBody - @DockAnnotation(isAdd = true) public Object saveB4Button(@RequestParam String ROLE_ID,@RequestParam String menuIds,@RequestParam String msg)throws Exception{ Map map = new HashMap(); PageData pd = new PageData(); diff --git a/src/main/java/com/zcloud/controller/czksmap/CzksMapController.java b/src/main/java/com/zcloud/controller/czksmap/CzksMapController.java index 34e323f9..a115b6c5 100644 --- a/src/main/java/com/zcloud/controller/czksmap/CzksMapController.java +++ b/src/main/java/com/zcloud/controller/czksmap/CzksMapController.java @@ -8,8 +8,6 @@ import com.zcloud.service.czksbimap.CzksBiMapService; import com.zcloud.service.bus.CorpInfoService; import com.zcloud.service.fireresources.CzksFireResourcesService; import com.zcloud.service.gatemachine.GateMachineService; -//import com.zcloud.service.keyProjects.MeteorologicalService; -//import com.zcloud.service.keyProjects.MeteorologicalinfoService; import com.zcloud.service.keyProjects.PlatformvideomanagementService; import com.zcloud.service.keyProjects.VideoManagerService; import com.zcloud.service.system.DepartmentService; @@ -242,11 +240,12 @@ public class CzksMapController extends BaseController { */ @RequestMapping("/getGatesInAndOutNumById") @ResponseBody - public ReturnMap getGatesInAndOutNumById() { + public ReturnMap getGatesInAndOutNumById(Page page) { ReturnMap returnMap = new ReturnMap(); - PageData pageData = this.getPageData(); - Map data = biMapService.getGatesInAndOutNumById(pageData); - returnMap.put("pd", data); + page.setCurrentPage(1); + page.setShowCount(999); + page.setPd(this.getPageData()); + returnMap.put("data", biMapService.getGatesInAndOutNumById(page).get("data")); return returnMap; } diff --git a/src/main/java/com/zcloud/controller/gatemachine/GateAreaController.java b/src/main/java/com/zcloud/controller/gatemachine/GateAreaController.java index 6dd09f92..442dd02e 100644 --- a/src/main/java/com/zcloud/controller/gatemachine/GateAreaController.java +++ b/src/main/java/com/zcloud/controller/gatemachine/GateAreaController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.gatemachine; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -9,7 +11,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * 说明:TODO @@ -36,22 +40,33 @@ public class GateAreaController extends BaseController { } @RequestMapping(value = "/edit") - public ReturnMap edit() { - PageData pd = this.getPageData(); - gateAreaService.edit(pd); - return ReturnMap.ok(); + @DockAnnotation + public Object edit() { + PageData pageData = this.getPageData(); + gateAreaService.edit(pageData); + Map map = new HashMap(); + map.put("dockData", JSON.toJSONString(pageData)); + return map; } + @RequestMapping(value = "/removeByIds") - public ReturnMap removeByIds() { + @DockAnnotation + public Object removeByIds() { PageData pageData = this.getPageData(); gateAreaService.removeByIds(pageData); - return ReturnMap.ok(); + Map map = new HashMap(); + map.put("dockData", JSON.toJSONString(pageData)); + return map; } + @RequestMapping(value = "/add") - public ReturnMap add() { + @DockAnnotation + public Object add() { PageData pageData = this.getPageData(); gateAreaService.save(pageData); - return ReturnMap.ok(); + Map map = new HashMap(); + map.put("dockData", JSON.toJSONString(pageData)); + return map; } } diff --git a/src/main/java/com/zcloud/controller/gatemachine/GateCarIOController.java b/src/main/java/com/zcloud/controller/gatemachine/GateCarIOController.java index c8028ef6..1f1017e4 100644 --- a/src/main/java/com/zcloud/controller/gatemachine/GateCarIOController.java +++ b/src/main/java/com/zcloud/controller/gatemachine/GateCarIOController.java @@ -101,4 +101,13 @@ public class GateCarIOController extends BaseController { return ReturnMap.ok().put("data", gateCarIOService.getAllEQCount(this.getPageData())); } + /** + * 获取在场,离场,总量计数 + * @return + */ + @RequestMapping(value = "/getTodayEQCountAllForOne") + public ReturnMap getTodayEQCountAllForOne() { + return ReturnMap.ok().put("data", gateCarIOService.getAllEQCountForOne(this.getPageData())); + } + } diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java index f3bb3a37..f38a2672 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java @@ -366,7 +366,7 @@ public class SafetyEnvironmentalController extends BaseController { @RequestMapping(value = "/edit") @RequiresPermissions("safetyenvironmental:edit") @ResponseBody - @DockAnnotation + @DockAnnotation(hasAnnex = true) public Object edit() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -377,6 +377,7 @@ public class SafetyEnvironmentalController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("CORPINFO_ID", "1".equals(Jurisdiction.getUSER_ID()) ? "" : Jurisdiction.getCORPINFO_ID()); //企业ID pd.put("ACTION_USER", Jurisdiction.getName()); //操作人 + ArrayList strings = new ArrayList<>(); if (StringUtils.isNotBlank(pd.getString("CONFIRM_MESSAGE_SIGN"))) { MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("CONFIRM_MESSAGE_SIGN")); String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase(); @@ -390,9 +391,11 @@ public class SafetyEnvironmentalController extends BaseController { String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName); } List hiddenList = safetyenvironmentalService.edit(pd); pd.put("hiddenList", hiddenList); + map.put("sendPicturesList", JSON.toJSONString(strings)); map.put("pd", pd); map.put("result", errInfo); map.put("dockData", JSON.toJSONString(pd)); diff --git a/src/main/java/com/zcloud/controller/keyProjects/PlatformvideomanagementController.java b/src/main/java/com/zcloud/controller/keyProjects/PlatformvideomanagementController.java index 149d73d6..50afa45b 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/PlatformvideomanagementController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/PlatformvideomanagementController.java @@ -7,6 +7,7 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.service.keyProjects.PlatformvideomanagementService; import com.zcloud.util.Jurisdiction; +import com.zcloud.util.ReturnMap; import com.zcloud.util.Tools; import com.zcloud.util.hk.HKUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -127,10 +128,10 @@ public class PlatformvideomanagementController extends BaseController { PageData pd =this.getPageData(); map = HKUtil.cameraSearch(pd); if(ObjectUtils.isEmpty(map)){ - map = new HashMap(); + return ReturnMap.error("海康平台摄像头调用失败"); } - HashMap data = new HashMap<>(); - map.put("data", data); + //HashMap data = new HashMap<>(); + //map.put("data", data); map.put("result", "success"); return map; } diff --git a/src/main/java/com/zcloud/controller/map/MapEightController.java b/src/main/java/com/zcloud/controller/map/MapEightController.java index 9e6e291c..f003c2b4 100644 --- a/src/main/java/com/zcloud/controller/map/MapEightController.java +++ b/src/main/java/com/zcloud/controller/map/MapEightController.java @@ -26,7 +26,7 @@ import java.util.Map; * 官网:www.zcloudchina.com */ @Controller -@RequestMapping("/map/Eight") +@RequestMapping("/czksmap/Eight") public class MapEightController extends BaseController { @Autowired diff --git a/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java b/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java index cd578d8d..b40ed73a 100644 --- a/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/firemanager/FireCheckStandardMapper.java @@ -17,7 +17,7 @@ public interface FireCheckStandardMapper { void updById(PageData pd); - void delByIds(PageData pd); + void delByIds(String[] ArrayDATA_IDS); void saveInfo(PageData pd); diff --git a/src/main/java/com/zcloud/service/czksbimap/CzksBiMapService.java b/src/main/java/com/zcloud/service/czksbimap/CzksBiMapService.java index 3c370ec4..87fa1a18 100644 --- a/src/main/java/com/zcloud/service/czksbimap/CzksBiMapService.java +++ b/src/main/java/com/zcloud/service/czksbimap/CzksBiMapService.java @@ -37,7 +37,7 @@ public interface CzksBiMapService { // PageData getGatesInAndOutNumById(PageData pageData); - Map getGatesInAndOutNumById(PageData pageData); + Map getGatesInAndOutNumById(Page page); Map getPerpleCarGateMachineCount(PageData pageData); diff --git a/src/main/java/com/zcloud/service/czksbimap/impl/CzksBiMapServiceImpl.java b/src/main/java/com/zcloud/service/czksbimap/impl/CzksBiMapServiceImpl.java index 4f705f76..781eef24 100644 --- a/src/main/java/com/zcloud/service/czksbimap/impl/CzksBiMapServiceImpl.java +++ b/src/main/java/com/zcloud/service/czksbimap/impl/CzksBiMapServiceImpl.java @@ -5,9 +5,12 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.mapper.datasource.bus.CorpInfoMapper; import com.zcloud.mapper.datasource.czksbimap.CzksBiMapMapper; +import com.zcloud.mapper.datasource.gatemachine.CzksGateAreaMapper; +import com.zcloud.mapper.datasource.gatemachine.CzksGateCarIOMapper; import com.zcloud.mapper.dsno2.fireresources.CzksFireResourcesMapper; import com.zcloud.mapper.datasource.keyProjects.PlatformvideomanagementMapper; import com.zcloud.service.czksbimap.CzksBiMapService; +import com.zcloud.service.gatemachine.GateCarIOService; import com.zcloud.util.czksBiMapFactory.AbsCzksFireSourcesHandel; import com.zcloud.util.czksBiMapFactory.CzksAssemblyBeanFactory; import org.apache.commons.lang.StringUtils; @@ -28,9 +31,16 @@ import java.util.*; @Service public class CzksBiMapServiceImpl implements CzksBiMapService { + @Resource + private CzksGateCarIOMapper czksGateCarIOMapper; @Resource private CzksBiMapMapper czksBiMapper; + @Autowired + GateCarIOService gateCarIOService; + + @Autowired + CzksGateAreaMapper czksGateAreaMapper; @Resource private CzksFireResourcesMapper czksfireResourcesMapper; @Autowired @@ -182,24 +192,35 @@ public class CzksBiMapServiceImpl implements CzksBiMapService { }*/ @Override - public Map getGatesInAndOutNumById(PageData pd) { - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String fendDate = simpleDateFormat.format(new Date()); - Calendar now = Calendar.getInstance(); - now.add(Calendar.MINUTE, -1); - Date before = now.getTime(); - String fstartDate = simpleDateFormat.format(before); + public Map getGatesInAndOutNumById(Page page) { Map result = new HashMap<>(); - if (pd.getString("TYPE").equals("PERSON")){ - result = restTemplate.getForObject(url2+"/region/access/bayonetPersonnelEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate="+fendDate+"&workNumber=&accId="+pd.getString("id"),Map.class); - }else { - result = restTemplate.getForObject(url2+"/region/access/bayonetVehicleEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate="+fendDate+"&carsign=&accId="+pd.getString("id"),Map.class); + PageData pd = page.getPd(); + List datalistPage = czksGateAreaMapper.getDatalistPage(page); + String gateAreaName = (String) datalistPage.get(0).get("GATE_AREA_NAME"); + if (gateAreaName != null && "矿石作业区域".equals(gateAreaName)) { + pd.put("GATE_AREA_TYPE", "1"); + } else if (gateAreaName != null && "杂货作业区域".equals(gateAreaName)) { + pd.put("GATE_AREA_TYPE", "2"); } - Object msg = result.get("msg"); - if (msg!=null && msg.equals("success")) { - result.remove("msg"); - result.put("result","success"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime()); + pd.put("startTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime())); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + pd.put("endTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendar.getTime())); + page.setPd(pd); + List ioRecord = new ArrayList<>(); + if (page.getPd().get("GATE_AREA_TYPE") != null && "1".equals(page.getPd().get("GATE_AREA_TYPE"))) { + ioRecord = czksGateCarIOMapper.getMineralDatalistPage(page); + } else if (page.getPd().get("GATE_AREA_TYPE") != null && "2".equals(page.getPd().get("GATE_AREA_TYPE"))) { + ioRecord = czksGateCarIOMapper.getGroceryDatalistPage(page); } + result.put("data", ioRecord); return result; } diff --git a/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java b/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java index b9f5ebf2..574ccc83 100644 --- a/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java +++ b/src/main/java/com/zcloud/service/firemanager/impl/FireCheckStandardServiceImpl.java @@ -64,8 +64,21 @@ public class FireCheckStandardServiceImpl implements FireCheckStandardService { @Transactional(rollbackFor = Exception.class) public boolean delCheckStandardByIds(PageData pd) { PageData data = fireCheckStandardMapper.tryDel(pd); + String data_ids = pd.getString("DATA_IDS"); + String[] ArrayDATA_IDS = data_ids.split(","); + /*String newIds = ""; + for (int i = 0 ; i < split.length ; i++) { + if (i == 0) { + newIds = split[i]+"',"; + }else if (i == split.length-1) { + newIds = newIds + "'"+split[i]; + }else { + newIds = newIds + "'"+split[i]+"',"; + } + } + pd.put("DATA_IDS",newIds);*/ if ("0".equals(String.valueOf(data.get("sum")))) { - fireCheckStandardMapper.delByIds(pd); + fireCheckStandardMapper.delByIds(ArrayDATA_IDS); return true; } return false; diff --git a/src/main/java/com/zcloud/service/gatemachine/GateCarIOService.java b/src/main/java/com/zcloud/service/gatemachine/GateCarIOService.java index 35abd472..17c7472f 100644 --- a/src/main/java/com/zcloud/service/gatemachine/GateCarIOService.java +++ b/src/main/java/com/zcloud/service/gatemachine/GateCarIOService.java @@ -19,5 +19,6 @@ public interface GateCarIOService { PageData getTodayEQCount(PageData pageData); PageData getAllEQCount(PageData pageData); + PageData getAllEQCountForOne(PageData pageData); } diff --git a/src/main/java/com/zcloud/service/gatemachine/impl/GateCarIOServiceImpl.java b/src/main/java/com/zcloud/service/gatemachine/impl/GateCarIOServiceImpl.java index a911e6a4..cd61bf3a 100644 --- a/src/main/java/com/zcloud/service/gatemachine/impl/GateCarIOServiceImpl.java +++ b/src/main/java/com/zcloud/service/gatemachine/impl/GateCarIOServiceImpl.java @@ -2,10 +2,12 @@ package com.zcloud.service.gatemachine.impl; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.gatemachine.CzksGateAreaMapper; import com.zcloud.mapper.datasource.gatemachine.CzksGateCarIOMapper; import com.zcloud.service.gatemachine.GateCarIOService; import com.zcloud.util.InitPageDataUtil; import com.zcloud.util.UuidUtil; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -21,7 +23,11 @@ public class GateCarIOServiceImpl implements GateCarIOService { @Resource private CzksGateCarIOMapper czksGateCarIOMapper; + @Autowired + GateCarIOService gateCarIOService; + @Autowired + CzksGateAreaMapper czksGateAreaMapper; @Resource private InitPageDataUtil initPageDataUtil; @@ -128,4 +134,18 @@ public class GateCarIOServiceImpl implements GateCarIOService { pageData.put("mineral", czksGateCarIOMapper.countMineralEnterAndQuitAll(pd)); return pageData; } + + @Override + public PageData getAllEQCountForOne(PageData pd) { + Page page = new Page(); + page.setPd(pd); + List datalistPage = czksGateAreaMapper.getDatalistPage(page); + String gateAreaName = (String) datalistPage.get(0).get("GATE_AREA_NAME"); + if (gateAreaName != null && "矿石作业区域".equals(gateAreaName)) { + pd = czksGateCarIOMapper.countMineralEnterAndQuitAll(pd); + } else if (gateAreaName != null && "杂货作业区域".equals(gateAreaName)) { + pd = czksGateCarIOMapper.countGroceryEnterAndQuitAll(pd); + } + return pd; + } } diff --git a/src/main/java/com/zcloud/service/map/impl/MapKeyProjectServiceImpl.java b/src/main/java/com/zcloud/service/map/impl/MapKeyProjectServiceImpl.java index 2dd375c6..8fe389ac 100644 --- a/src/main/java/com/zcloud/service/map/impl/MapKeyProjectServiceImpl.java +++ b/src/main/java/com/zcloud/service/map/impl/MapKeyProjectServiceImpl.java @@ -71,7 +71,7 @@ public class MapKeyProjectServiceImpl implements MapKetProjectService { if(StringUtils.equals(typeStr,"PROJECT")){ r = keyProjectMapper.getProjectLocation(pd); //视频 - }else if(StringUtils.equals(typeStr,"camera")){ + }else if(StringUtils.equals(typeStr,"VIDEO")){ r = keyProjectMapper.getVideoLocation(pd); } returnMap.put("varList", r); diff --git a/src/main/java/com/zcloud/util/HiddenExcelImgToSessionView.java b/src/main/java/com/zcloud/util/HiddenExcelImgToSessionView.java index 15b510fd..2366abae 100644 --- a/src/main/java/com/zcloud/util/HiddenExcelImgToSessionView.java +++ b/src/main/java/com/zcloud/util/HiddenExcelImgToSessionView.java @@ -19,7 +19,6 @@ import org.apache.poi.ss.usermodel.VerticalAlignment; import org.apache.poi.ss.usermodel.Workbook; import org.apache.shiro.session.Session; import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; import org.springframework.web.servlet.view.document.AbstractXlsView; import com.zcloud.entity.PageData; @@ -31,10 +30,11 @@ import net.coobird.thumbnailator.Thumbnails; * 作者:luoxiaobao * 官网:www.qdkjchina.com */ -@Component public class HiddenExcelImgToSessionView extends AbstractXlsView{ - private String fileUrl = "http://192.168.192.201:8991/file/"; + @Value("${http.file.url}") + private String fileUrl; + @Override protected void buildExcelDocument(Map model, Workbook workbook, HttpServletRequest request, diff --git a/src/main/java/com/zcloud/util/HiddenExcelImgView.java b/src/main/java/com/zcloud/util/HiddenExcelImgView.java index 8b788f4b..a447a4bf 100644 --- a/src/main/java/com/zcloud/util/HiddenExcelImgView.java +++ b/src/main/java/com/zcloud/util/HiddenExcelImgView.java @@ -38,8 +38,8 @@ import com.zcloud.entity.PageData; */ public class HiddenExcelImgView extends AbstractXlsView{ - - private String fileUrl = "http://192.168.192.201:8991/file/"; + @Value("${http.file.url}") + private String fileUrl; @Override protected void buildExcelDocument(Map model, diff --git a/src/main/java/com/zcloud/util/hk/HKUtil.java b/src/main/java/com/zcloud/util/hk/HKUtil.java index 68c76148..0828ca30 100644 --- a/src/main/java/com/zcloud/util/hk/HKUtil.java +++ b/src/main/java/com/zcloud/util/hk/HKUtil.java @@ -38,6 +38,7 @@ public class HKUtil { path.put("https://", getCamsApi); // post请求application/json类型参数 String result =ArtemisHttpUtil.doPostStringArtemis(path,jsonBody.toJSONString(),null,null,"application/json",null); + JSONObject parseObject = JSONArray.parseObject(result); return parseObject; } diff --git a/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml index 1c1c5137..88e4822c 100644 --- a/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml +++ b/src/main/resources/mybatis/datasource/firemanager/FireCheckStandardMapper.xml @@ -24,11 +24,14 @@ WHERE FIRE_CHECK_STANDARD_ID = #{FIRE_CHECK_STANDARD_ID} - + UPDATE bus_fire_check_standard SET ISDELETE = 1 - WHERE FIRE_CHECK_STANDARD_ID in (#{DATA_IDS}) - + WHERE FIRE_CHECK_STANDARD_ID in + + #{item} + + insert into bus_fire_check_standard diff --git a/src/main/resources/mybatis/datasource/gatemachine/CzksGateCarIOMapper.xml b/src/main/resources/mybatis/datasource/gatemachine/CzksGateCarIOMapper.xml index 2cb017f4..584bb047 100644 --- a/src/main/resources/mybatis/datasource/gatemachine/CzksGateCarIOMapper.xml +++ b/src/main/resources/mybatis/datasource/gatemachine/CzksGateCarIOMapper.xml @@ -165,7 +165,8 @@ select count(case when m.PASS_TYPE = '0' then 0 end) as `entered`, - count(case when m.PASS_TYPE = '1' then 1 end) as `quited` + count(case when m.PASS_TYPE = '1' then 1 end) as `quited`, + count(case when m.PASS_TYPE = '0' then 0 end) - count(case when m.PASS_TYPE = '1' then 1 end) as present from `qa-czks-prevention`.`work_mineral_io_record` m where @@ -211,7 +213,7 @@ and f.CAR_TEAM_NAME like CONCAT(CONCAT('%',#{pd.CAR_TEAM_NAME}),'%') - order by f.OPERATTIME desc + order by f.JGSJ desc diff --git a/src/main/resources/mybatis/datasource/map/MapKeyProjectMapper.xml b/src/main/resources/mybatis/datasource/map/MapKeyProjectMapper.xml index 2107447c..8a72e8af 100644 --- a/src/main/resources/mybatis/datasource/map/MapKeyProjectMapper.xml +++ b/src/main/resources/mybatis/datasource/map/MapKeyProjectMapper.xml @@ -79,7 +79,7 @@