diff --git a/src/main/java/com/glxp/api/constant/BasicProcessStatus.java b/src/main/java/com/glxp/api/constant/BasicProcessStatus.java index dab537fe..97bfe2cc 100644 --- a/src/main/java/com/glxp/api/constant/BasicProcessStatus.java +++ b/src/main/java/com/glxp/api/constant/BasicProcessStatus.java @@ -27,7 +27,7 @@ public class BasicProcessStatus { public static final int BASIC_THIRD_ORDER = 6; //往来单位 public static final String NEW_ALL_DATA = "7"; //用户相关信息 public static final String NEW_ALL_BUS = "8"; - public static final String NEW_ALL_ORDER = "9"; + public static final String NEW_ALL_ORDER = "出入库扫码单据"; public static final String NEW_ALL_BUS_ORDER = "11"; public static final String NEW_ALL_DI = "10"; diff --git a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java index 8291ae8d..1016d4cc 100644 --- a/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java +++ b/src/main/java/com/glxp/api/controller/sync/SpsSyncDownloadController.java @@ -449,7 +449,7 @@ public class SpsSyncDownloadController { deptDao.insertOrUpdateBatch(bean.getDeptEntityList()); } if (CollectionUtil.isNotEmpty(bean.getDeptUserEntities())) { - deptUserDao.insertOrUpdateBatch(bean.getDeptUserEntities()); + deptUserDao.replaceBatch(bean.getDeptUserEntities()); } if (CollectionUtil.isNotEmpty(bean.getInvWarehouseEntities())) { invWarehouseDao.insertOrUpdateBatch(bean.getInvWarehouseEntities()); @@ -458,7 +458,9 @@ public class SpsSyncDownloadController { warehouseUserDao.insertOrUpdateBatch(bean.getWarehouseUserEntities()); } if (CollectionUtil.isNotEmpty(bean.getWarehouseBussinessTypeEntities())) { - warehouseBussinessTypeDao.insertOrUpdateBatch(bean.getWarehouseBussinessTypeEntities()); + for (WarehouseBussinessTypeEntity warehouseBussinessTypeEntity : bean.getWarehouseBussinessTypeEntities()) { + warehouseBussinessTypeDao.insertOrUpdate(warehouseBussinessTypeEntity); + } } if (CollectionUtil.isNotEmpty(bean.getInvSpaces())) { invSpaceDao.insertOrUpdateBatch(bean.getInvSpaces()); diff --git a/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java b/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java index ccefcb42..0808e930 100644 --- a/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java +++ b/src/main/java/com/glxp/api/dao/auth/DeptUserDao.java @@ -30,5 +30,7 @@ public interface DeptUserDao extends BaseMapperPlus list); + int replaceBatch(@Param("list")List list); + } diff --git a/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java b/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java index 0ab04879..bad14a81 100644 --- a/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java +++ b/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java @@ -15,12 +15,6 @@ public interface WarehouseBussinessTypeDao extends BaseMapperPlus SELECT auth_dept_user.*, - auth_user.userName, - auth_user.employeeName, - auth_dept.`name` deptName, - auth_user.comments + auth_user.userName, + auth_user.employeeName, + auth_dept.`name` deptName, + auth_user.comments FROM auth_dept_user - left JOIN auth_user - on auth_dept_user.userId = auth_user.id - left JOIN auth_dept on auth_dept_user.deptId = auth_dept.id + left JOIN auth_user + on auth_dept_user.userId = auth_user.id + left JOIN auth_dept on auth_dept_user.deptId = auth_dept.id and deptId = #{deptId} @@ -64,7 +64,7 @@ and (auth_user.userName like concat('%', #{key}, '%') or - auth_user.employeeName like concat('%', #{key}, '%')) + auth_user.employeeName like concat('%', #{key}, '%')) @@ -101,12 +101,23 @@ insert INTO auth_dept_user - (deptId, userId) + (deptId, userId, updateTime) + values + + (#{item.deptId}, + #{item.userId}, #{item.updateTime}) + + + + + replace INTO auth_dept_user + (deptId, userId, updateTime) values (#{item.deptId}, - #{item.userId}) + #{item.userId}, #{item.updateTime}) diff --git a/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml b/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml index a5348b50..775664cf 100644 --- a/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml +++ b/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml @@ -27,12 +27,6 @@ where id = #{id,jdbcType=INTEGER} - - - insert into auth_warehouse_bustype (code, `action`, `name`) - values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}) - @@ -150,86 +144,6 @@ (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - insert into auth_warehouse_bustype - - - id, - - - code, - - - `action`, - - - `name`, - - - values - - - #{id,jdbcType=INTEGER}, - - - #{code,jdbcType=VARCHAR}, - - - #{action,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - - code = #{code,jdbcType=VARCHAR}, - - - `action` = #{action,jdbcType=VARCHAR}, - - - `name` = #{name,jdbcType=VARCHAR}, - - -