Browse Source

Merge branch 'V0.0.4' of http://10.87.21.221:8000/jzyd_yyds/soc into V0.0.4

zhulu 1 year ago
parent
commit
78d44c0522

+ 8 - 0
project_data/sql/0.0.4/soc/soc.sql

@@ -191,6 +191,14 @@ delete  from sys_config where  config_key='is_display_password';
 INSERT INTO sys_config ( config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark )
 VALUES
     ( '是否显示修改资料和修改密码', 'is_display_password', 'Y', 'Y', 'jwx', now(), 'jwx', now(), 'Y不显示,N显示' );
+DELETE FROM `sys_menu` WHERE id IN(1714247486990786561,2126,01717081639428923393,01717081756911378434);
+INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark)
+VALUES (1714247486990786561, '撤回计划', 2052, 9, '', null, null, 1, 0, 'F', '0', '0', 'core:accessPlan:withdraw', '1', null, null, null, now(), '', null, '');
+INSERT INTO `sys_menu` VALUES (2126, '下发任务', 2052, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'core:accessPlan:release', '1', '#', NULL, '超级管理员', '2023-09-04 17:54:35', '', NULL, '');
+INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (01717081639428923393, '下发', 1717076927401005058, 7, NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'core:evaluatePlan:distribute', '1', NULL, NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
+INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES (01717081756911378434, '撤回', 1717076927401005058, 8, NULL, NULL, NULL, 1, 0, 'F', '0', '0', 'core:evaluatePlan:withdraw', '1', NULL, NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
 -- 修改菜单排序
 UPDATE `sys_menu` SET `order_num` = 2 WHERE `menu_name` = '驾驶舱';
 UPDATE `sys_menu` SET `order_num` = 4 WHERE `menu_name` = '日常履职';

+ 1 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysOrgExtend.java

@@ -100,6 +100,7 @@ public class SysOrgExtend extends BaseEntity {
     /**
      * 值守方式
      */
+    @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "值守方式")
     private Integer dutyMode;
 

+ 3 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/controller/TMonitoringRetrievalPlanController.java

@@ -75,7 +75,7 @@ public class TMonitoringRetrievalPlanController extends BaseController {
         } else if (SecurityUtils.getUserId() == 1) {
             admin = true;
         }
-        ajax.put("check", admin);
+     //   ajax.put("check", admin);
         ajax.put("isEdit", sysOrg.getId());
         return ajax;
     }
@@ -84,7 +84,7 @@ public class TMonitoringRetrievalPlanController extends BaseController {
      * 下发
      */
     @ApiOperation(value = "下发")
-    @RequiresPermissions("core:accessPlan:add")
+    @RequiresPermissions("core:accessPlan:release")
     @GetMapping(value = "/distribute/{id}")
     public AjaxResult distribute(@PathVariable(value = "id", required = false) Long id) throws ParseException {
         return success(tMonitoringRetrievalPlanService.distribute(id));
@@ -94,7 +94,7 @@ public class TMonitoringRetrievalPlanController extends BaseController {
      * 撤回
      */
     @ApiOperation(value = "撤回")
-    @RequiresPermissions("core:accessPlan:add")
+    @RequiresPermissions("core:accessPlan:withdraw")
     @GetMapping(value = "/withdraw/{id}")
     public AjaxResult withdraw(@PathVariable(value = "id", required = false) Long id) {
         return success(tMonitoringRetrievalPlanService.withdraw(id));

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/evaluate/controller/CoreEvaluatePlanController.java

@@ -122,14 +122,14 @@ public class CoreEvaluatePlanController extends BaseController {
      * 下发
      */
     @ApiOperation(value = "下发")
-    @RequiresPermissions("core:evaluatePlan:add")
+    @RequiresPermissions("core:evaluatePlan:distribute")
     @GetMapping(value = "/distribute/{id}")
     public AjaxResult distribute(@PathVariable(value = "id", required = false) Long id) {
         return toAjax(coreEvaluatePlanService.distribute(id));
     }
 
     @ApiOperation(value = "取消下发")
-    @RequiresPermissions("core:evaluatePlan:remove")
+    @RequiresPermissions("core:evaluatePlan:withdraw")
     @GetMapping(value = "/withdraw/{id}")
     public AjaxResult withdraw(@PathVariable(value = "id", required = false) Long id) {
         return toAjax(coreEvaluatePlanService.withdraw(id));

+ 1 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/letter/service/impl/CoreOutInRecordServiceImpl.java

@@ -272,7 +272,6 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
         //来访单位
         String outOrgName = ObjectUtil.isNotEmpty(outOrg.getShortName()) ? outOrg.getShortName() : outOrg.getName();
         data.put("outOrgName", outOrgName);
-        log.info("***********:{}",JSON.toJSONString(data));
         //来访人员
         data.put("userName", record.getUserName());
         //证件类型
@@ -306,7 +305,7 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
             List<String> strings = new ArrayList<>();
             for (String json : list) {
                 final Map map = JSON.parseObject(json, Map.class);
-                final String url = (String) map.get("url");
+                final String url = (String) map.get("imgPath");
                 if (ObjectUtil.isNotEmpty(url)) {
                     strings.add(url);
                 }

+ 2 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java

@@ -113,7 +113,8 @@ public class ApiPlanController {
 
     @GetMapping("/buildPdf")
     public AjaxResult buildPdf() {
-        return appPlanService.buildPdf();
+        appPlanService.buildPdf();
+        return AjaxResult.success();
     }
 
     /**

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/AppPlanService.java

@@ -88,7 +88,7 @@ public interface AppPlanService extends IService<AppPlan> {
 
     AppPlan distributeHS(Long id, Boolean immediateEffect);
 
-    AjaxResult buildPdf();
+    void buildPdf();
     AjaxResult buildResumptionPdf(Long id);
 
     /**

+ 6 - 7
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java

@@ -11,13 +11,12 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.constant.Constants;
 import com.xunmei.common.core.constant.ErrorMsgConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.DateRange;
 import com.xunmei.common.core.domain.R;
-import com.xunmei.common.core.enums.OrgTypeEnum;
 import com.xunmei.common.core.enums.PlanStatus;
-import com.xunmei.common.core.enums.resumption.ResumptionTaskStatus;
 import com.xunmei.common.core.exception.ServiceException;
 import com.xunmei.common.core.domain.registerbook.domain.CoreRegisterBookPdf;
 import com.xunmei.common.core.enums.RegisterBookType;
@@ -419,6 +418,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
 
     /**
      * 删除本轮次及之前的所有任务(无论状态)
+     *
      * @param solidPlanIds
      */
     @Async
@@ -1019,7 +1019,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
         Map<String, Object> data = this.getFtlResumption(orgid);
         data.put("fileName", fileName);
         data.put("orgName", sysOrg.getShortName());
-        data.put("dateStr", DateUtils.getTime());
+        data.put("dateStr", DateUtil.format(new Date(), Constants.DAILY_FORMAT));
         data.put("remark", "");
         CompletableFuture.runAsync(() -> {
             R<String> r = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.generateResumptionPdf(data), ErrorMsgConstants.GENERATE_PDF_ERROR);
@@ -1053,20 +1053,19 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
 
     @Async
     @Override
-    public AjaxResult buildPdf() {
-        Date date = DateUtils.addDays(new Date(), -1);
+    public void buildPdf() {
+        Date date = new Date();
 
         List<Resumption> resumptions = resumptionMapper.selectList(new LambdaQueryWrapper<Resumption>().eq(Resumption::getYmdDate, DateUtils.toLocalDate(date)).eq(Resumption::getStatus, 3));
         List<Long> orgIds = resumptions.stream().map(Resumption::getOrgId).distinct().collect(Collectors.toList());
         orgIds.forEach(this::buildResumptionPdf);
-        return AjaxResult.success("正在生成pdf,请稍后刷新页面查看!");
     }
 
     private Map<String, Object> getFtlResumption(Long orgId) {
         Map<String, Object> data = new HashMap<>();
         //获取前一天
 //        Date date = DateUtils.addDays(new Date(), 0);
-        Date date = DateUtils.addDays(new Date(), -1);
+        Date date = new Date();
         //获取营业前的所有履职信息
         List<Resumption> before = resumptionMapper.selectByYmdDateAndExec(date, 2, orgId);
         //获取营业期间的所有履职信息