zhuang 8 miesięcy temu
rodzic
commit
2c44cfab24

+ 21 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxProjectManageDao.java

@@ -121,4 +121,25 @@ public interface ZhcxProjectManageDao extends BaseMapper<ZhcxProjectManageDo> {
             " GROUP BY MACHINENO" +
             "</script>")
     List<String> searchData(Map<String, Object> map);
+    @Select("<script>SELECT x.*, di.SORT AS DEPTSORT,di2.SORT AS FIRSTDEPTSORT" +
+            " FROM INCONTROL.ZHCX_PROJECT_RECTIFY_MACHINE x " +
+            "LEFT JOIN SYS_DICT di ON x.DEPTID = di.ID AND di.DICTTYPE = 'rectification_organization' " +
+            "LEFT JOIN SYS_DICT di2 ON x.FIRSTDEPTID  = di2.ID AND di.DICTTYPE = 'rectification_organization' " +
+            "<where> " +
+            "<if test='projectId !=null'>" +
+            "AND x.PRJID = #{projectId}" +
+            "</if>" +
+            "<if test='batchId !=null'>" +
+            "AND x.BATCHID=#{batchId}" +
+            "</if>" +
+            "<if test='machineno !=null'>" +
+            "AND x.REALMACHINENO=#{machineno}" +
+            "</if>" +
+            " and x.STATUS is not null " +
+            "<if test='ifoutsidebase !=null'>" +
+            "AND x.DEPTID is not null and x.IFOUTSIDEBASE in ('inside', 'outside')" +
+            "</if>" +
+            "</where>" +
+            "</script>")
+    List<ZhcxProjectRectifyMachineVo> getListApiData(Map<String, Object> map);
 }

+ 2 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxProjectManageService.java

@@ -101,4 +101,6 @@ public interface ZhcxProjectManageService extends IService<ZhcxProjectManageDo>
     void exportRectifySnapData(Map<String, Object> map, HttpServletResponse response);
 
     void cronGenerateRectifyData();
+
+    List<ZhcxProjectRectifyMachineVo> getListApiData(Map<String, Object> map);
 }

+ 3 - 2
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxApiServiceImpl.java

@@ -424,7 +424,7 @@ public class ZhcxApiServiceImpl implements ZhcxApiService {
         List<RectifyApiDataDto> rectifyDtoList = new ArrayList<>();
         if (projectManageDo != null) {
             map.put("projectId", projectManageDo.getId());
-            List<ZhcxProjectRectifyMachineVo> list = zhcxProjectManageService.getListData(map);
+            List<ZhcxProjectRectifyMachineVo> list = zhcxProjectManageService.getListApiData(map);
 
             if (list != null && list.size() > 0) {
                 // 处理一级部门数据
@@ -544,7 +544,8 @@ public class ZhcxApiServiceImpl implements ZhcxApiService {
                     SysUserDo user = null;
                     try {
                         LambdaQueryWrapper<SysUserDo> queryWrapper = Wrappers.lambdaQuery();
-                        queryWrapper.eq(SysUserDo::getMobile, sysUserDo.getMobile()).eq(SysUserDo::getName, sysUserDo.getName());
+                        //queryWrapper.eq(SysUserDo::getMobile, sysUserDo.getMobile()).eq(SysUserDo::getName, sysUserDo.getName());
+                        queryWrapper.eq(SysUserDo::getCode, sysUserDo.getCode());
                         user = sysUserService.getOne(queryWrapper);
                     } catch (Exception e) {
                         e.printStackTrace();

+ 5 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxProjectManageServiceImpl.java

@@ -473,6 +473,11 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
         return zhcxProjectManageDao.getListData(map);
     }
 
+    @Override
+    public List<ZhcxProjectRectifyMachineVo> getListApiData(Map<String, Object> map) {
+        return zhcxProjectManageDao.getListApiData(map);
+    }
+
     //private static final BeanCopier copier = BeanCopier.create(ZhcxProjectRectifyDo.class, ZhcxProjectRectifyVo.class, false);
     @Override
     public R getRectifyListData(Map<String, Object> map) {