Explorar el Código

NFC和调阅频次

luowei hace 2 años
padre
commit
ed7d7e3a58

+ 11 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java

@@ -129,6 +129,11 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
         TMonitoringRetrievalPlanVO tMonitoringRetrievalPlanVO = new TMonitoringRetrievalPlanVO();
         TMonitoringRetrievalPlan plan = tMonitoringRetrievalPlanMapper.selectById(id);
         BeanUtils.copyProperties(plan, tMonitoringRetrievalPlanVO);
+        tMonitoringRetrievalPlanVO.setParentFrequency(plan.getPlanFrequency());
+        if (null!=plan.getParentId()){
+            TMonitoringRetrievalPlan plan1 = tMonitoringRetrievalPlanMapper.selectById(plan.getParentId());
+            tMonitoringRetrievalPlanVO.setParentFrequency(plan1.getPlanFrequency());
+        }
         boolean isEdit = false;
         boolean isComplete = false;
         if (plan.getParentId() != null) {
@@ -274,12 +279,15 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                 for (SysOrg l : list) {
                     TMonitoringRetrievalPlan tMonitoringRetrievalPlan1 = new TMonitoringRetrievalPlan();
                     BeanUtils.copyProperties(tMonitoringRetrievalPlan, tMonitoringRetrievalPlan1);
+                    //创建机构是顶级的
                     tMonitoringRetrievalPlan1.setOrgId(l.getId());
                     tMonitoringRetrievalPlan1.setOrgPath(l.getPath());
                     tMonitoringRetrievalPlan1.setParentId(id);
                     tMonitoringRetrievalPlan1.setIsDistribute("1");
                     tMonitoringRetrievalPlan1.setCreateType(1);
                     if (!tMonitoringRetrievalPlan.getOrgType().equals("3")) {
+                        SysOrg sysOrg = remoteOrgService.selectSysOrgById(tMonitoringRetrievalPlan.getOrgId(), SecurityConstants.INNER);
+                        tMonitoringRetrievalPlan1.setOrgName(sysOrg.getShortName());
                         i = insertTMonitoringRetrievalPlan(tMonitoringRetrievalPlan1);
                     }
                     if (tMonitoringRetrievalPlan.getOrgType().equals("3")) {
@@ -626,10 +634,10 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
         } else {
             data = remoteOrgService.selectSysOrgById(sysUser.getOrgId(), SecurityConstants.INNER);
         }
-        tMonitoringRetrievalPlan.setOrgName(data.getShortName());
-        if (null == tMonitoringRetrievalPlan.getOrgId()) {
-            tMonitoringRetrievalPlan.setOrgId(sysUser.getOrgId());
+        if (null==tMonitoringRetrievalPlan.getOrgName()){
+            tMonitoringRetrievalPlan.setOrgName(data.getShortName());
         }
+        tMonitoringRetrievalPlan.setOrgId(data.getId());
         tMonitoringRetrievalPlan.setCreateBy(SecurityUtils.getUsername());
         tMonitoringRetrievalPlan.setUpdateTime(DateUtils.getNowDate());
         tMonitoringRetrievalPlan.setUpdateBy(SecurityUtils.getUsername());

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/vo/TMonitoringRetrievalPlanVO.java

@@ -17,4 +17,6 @@ public class TMonitoringRetrievalPlanVO extends TMonitoringRetrievalPlan {
     private Long parentOrgId;
     @ApiModelProperty(value = "是否有已完成和已逾期")
     private Boolean isComplete;
+    @ApiModelProperty(value = "父类调阅频次")
+    private Long parentFrequency;
 }

+ 3 - 2
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysNfcBindServiceImpl.java

@@ -16,6 +16,7 @@ import com.xunmei.system.service.ISysAreaCheckService;
 import com.xunmei.system.service.ISysAreaService;
 import com.xunmei.system.service.ISysNfcBindService;
 
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.xunmei.system.service.ISysOrgService;
@@ -132,7 +133,7 @@ public class SysNfcBindServiceImpl extends ServiceImpl<SysNfcBindMapper, SysNfcB
         sysNfcBind.setCreateTime(DateUtils.getNowDate());
         sysNfcBind.setDelFlag("0");
         sysNfcBind.setSource("1");
-        if(null==sysNfcBind.getCode()){
+        if(null==sysNfcBind.getLabelName()){
             sysNfcBind.setSource("2");
         }
         SysOrg sysOrg = sysOrgService.selectSysOrgById(sysNfcBind.getOrgId());
@@ -207,7 +208,7 @@ public class SysNfcBindServiceImpl extends ServiceImpl<SysNfcBindMapper, SysNfcB
     }
 
     @Override
-    public int deleteSysNfcBindByCode(String code) {
+    public int deleteSysNfcBindByCode(@Param("code") String code) {
         return sysNfcBindMapper.deleteSysNfcBindByCode(code);
     }