Selaa lähdekoodia

feat: prov_abbr

shc 8 kuukautta sitten
vanhempi
commit
dc0019bd9e

+ 3 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/dto/WmDaAgentDTO.java

@@ -23,6 +23,9 @@ public final class WmDaAgentDTO {
         @NotEmpty(message = "简称必填")
         private String abbr;
 
+        @NotEmpty(message = "服务省份简称必填")
+        private String provAbbr;
+
         /**
          * 所属区域
          */

+ 3 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/SysDept.java

@@ -44,6 +44,9 @@ public class SysDept implements Serializable {
     // 缩写
     private String abbr;
 
+    // 服务省份缩写
+    private String provAbbr;
+
     /**
      * 排序
      */

+ 6 - 0
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/WmDaAgent.java

@@ -229,4 +229,10 @@ public class WmDaAgent implements Serializable {
      */
     @TableField(exist = false)
     private String abbr;
+
+    /**
+     * 服务省份简称
+     */
+    @TableField(exist = false)
+    private String provAbbr;
 }

+ 2 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmDaAgentController.java

@@ -313,6 +313,7 @@ public class WmDaAgentController {
             wmDaAgent.setTenantId(CommonConstants.TENANT_ID_1);
             wmDaAgent.setAreaCodes(resource.getAreaCodes());
             wmDaAgent.setAbbr(resource.getAbbr());
+            wmDaAgent.setProvAbbr(resource.getProvAbbr());
             wmDaAgent.setQylx("0");
             wmDaAgent.setUpdateUser(0);
             wmDaAgent.setManagement("1");
@@ -752,6 +753,7 @@ public class WmDaAgentController {
         sysDept.setDelFlag(wmDaAgent.getEnableFlag());
         sysDept.setName(wmDaAgent.getGsmc());
         sysDept.setAbbr(wmDaAgent.getAbbr());
+        sysDept.setProvAbbr(wmDaAgent.getProvAbbr());
         sysDept.setDeptId(wmDaAgent.getDeptId());
         sysDept.setTaxCode(wmDaAgent.getZjNumber());
         sysDeptMapper.updateByPrimaryKeySelective(sysDept);

+ 6 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmDaAgentServiceImpl.java

@@ -150,6 +150,7 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
                     sysDept.setTaxCode(wmDaAgent.getZjNumber());
                     sysDept.setLevel(3);
                     sysDept.setAbbr(wmDaAgent.getAbbr());
+                    sysDept.setProvAbbr(wmDaAgent.getProvAbbr());
                     sysDept.setExpiryDate(queryDept.getExpiryDate());
                     sysDeptService.save(sysDept);
                     wmDaAgent.setDeptId(sysDept.getDeptId());
@@ -185,6 +186,7 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
                     sysDept.setName(wmDaAgent.getGsmc());
                     sysDept.setLevel(4);
                     sysDept.setAbbr(wmDaAgent.getAbbr());
+                    sysDept.setProvAbbr(wmDaAgent.getProvAbbr());
                     sysDept.setTaxCode(wmDaAgent.getZjNumber());
                     sysDept.setExpiryDate(queryDept.getExpiryDate());
                     sysDeptService.save(sysDept);
@@ -305,6 +307,8 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
             SysDept sysDept = new SysDept();
             sysDept.setDeptId(IDUtils.getId());
             sysDept.setTaxCode(wmDaAgent.getZjNumber());
+            sysDept.setAbbr(wmDaAgent.getAbbr());
+            sysDept.setProvAbbr(wmDaAgent.getProvAbbr());
             sysDept.setDeptPermissions(wmDaAgent.getDeptPermissions());
             sysDept.setFinancialReviewType(wmDaAgent.getFinancialReviewType());
             sysDept.setExpiryDate(now.plusYears(1L).toLocalDate());
@@ -579,6 +583,8 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
 //		}
 
         sysDept.setDeptPermissions(wmDaAgent.getDeptPermissions());
+        sysDept.setProvAbbr(wmDaAgent.getProvAbbr());
+        sysDept.setAbbr(wmDaAgent.getAbbr());
         sysDept.setFinancialReviewType(wmDaAgent.getFinancialReviewType());
         sysDeptMapper.updateByPrimaryKeySelective(sysDept);
         SysUser sysUser1 = new SysUser();

+ 1 - 0
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/WmDaAgentMapper.xml

@@ -200,6 +200,7 @@
     a.*,
     d.level as dept_level,
     d.abbr,
+    d.prov_abbr,
     d.dept_permissions
     from wm_da_agent a
     left join sys_dept d on a.dept_id = d.dept_id