Browse Source

新增 V2版本项目申报

Administrator 2 years ago
parent
commit
d6dcb82213
25 changed files with 1196 additions and 72 deletions
  1. 104 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/SendSmsController.java
  2. 21 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/ZsyzCommonController.java
  3. 7 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
  4. 34 48
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  5. 5 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
  6. 37 15
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
  7. 6 0
      ruoyi-common/pom.xml
  8. 16 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/CommonConstants.java
  9. 111 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/PwdCheckUtil.java
  10. 72 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/SendSmsUtils.java
  11. 154 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/RsaUtils.java
  12. 7 0
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
  13. 3 3
      ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzShyj.java
  14. 125 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/common/SendSms.java
  15. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/projectV2/ZsyzSbbzbMapper.java
  16. 62 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/projectV2/common/SendSmsMapper.java
  17. 7 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
  18. 29 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
  19. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/common/SendSmsServiceImpl.java
  20. 107 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/common/ZsyzCommonServiceImpL.java
  21. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/common/ISendSmsService.java
  22. 21 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/common/IZsyzCommonService.java
  23. 4 1
      ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzSbbzbMapper.xml
  24. 2 2
      ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzShyjMapper.xml
  25. 101 0
      ruoyi-system/src/main/resources/mapper/system/projectV2/common/SendSmsMapper.xml

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/SendSmsController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.projectV2.common;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.projectV2.common.SendSms;
+import com.ruoyi.system.service.projectV2.common.ISendSmsService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 短信日志Controller
+ * 
+ * @author ruoyi
+ * @date 2023-02-24
+ */
+@RestController
+@RequestMapping("/projectV2/sms")
+public class SendSmsController extends BaseController
+{
+    @Autowired
+    private ISendSmsService sendSmsService;
+
+    /**
+     * 查询短信日志列表
+     */
+    @PreAuthorize("@ss.hasPermi('projectV2:sms:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SendSms sendSms)
+    {
+        startPage();
+        List<SendSms> list = sendSmsService.selectSendSmsList(sendSms);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出短信日志列表
+     */
+    @PreAuthorize("@ss.hasPermi('projectV2:sms:export')")
+    @Log(title = "短信日志", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(SendSms sendSms)
+    {
+        List<SendSms> list = sendSmsService.selectSendSmsList(sendSms);
+        ExcelUtil<SendSms> util = new ExcelUtil<SendSms>(SendSms.class);
+        return util.exportExcel(list, "sms");
+    }
+
+    /**
+     * 获取短信日志详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('projectV2:sms:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(sendSmsService.selectSendSmsById(id));
+    }
+
+    /**
+     * 新增短信日志
+     */
+    @PreAuthorize("@ss.hasPermi('projectV2:sms:add')")
+    @Log(title = "短信日志", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SendSms sendSms)
+    {
+        return toAjax(sendSmsService.insertSendSms(sendSms));
+    }
+
+    /**
+     * 修改短信日志
+     */
+    @PreAuthorize("@ss.hasPermi('projectV2:sms:edit')")
+    @Log(title = "短信日志", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SendSms sendSms)
+    {
+        return toAjax(sendSmsService.updateSendSms(sendSms));
+    }
+
+    /**
+     * 删除短信日志
+     */
+    @PreAuthorize("@ss.hasPermi('projectV2:sms:remove')")
+    @Log(title = "短信日志", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(sendSmsService.deleteSendSmsByIds(ids));
+    }
+}

+ 21 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/ZsyzFjController.java → ruoyi-admin/src/main/java/com/ruoyi/web/controller/projectV2/common/ZsyzCommonController.java

@@ -13,9 +13,11 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.system.domain.projectV2.ZsyzFj;
 import com.ruoyi.system.domain.projectV2.ZsyzProjectDept;
 import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
+import com.ruoyi.system.domain.projectV2.ZsyzShyj;
 import com.ruoyi.system.service.projectV2.IZsyzFjService;
 import com.ruoyi.system.service.projectV2.IZsyzProjectDeptService;
 import com.ruoyi.system.service.projectV2.IZsyzSbbzbService;
+import com.ruoyi.system.service.projectV2.common.IZsyzCommonService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -28,14 +30,14 @@ import java.util.List;
 import static com.ruoyi.common.constant.CommonConstants.*;
 
 /**
- * 招商引资_附件Controller
+ * 公共Controller
  *
  * @author 博曼
  * @date 2023-02-22
  */
 @RestController
 @RequestMapping("/projectV2/common")
-public class ZsyzFjController extends BaseController {
+public class ZsyzCommonController extends BaseController {
     @Autowired
     private RedisCache redisCache;
 
@@ -44,6 +46,9 @@ public class ZsyzFjController extends BaseController {
 
     @Autowired
     private IZsyzProjectDeptService zsyzProjectDeptService;
+
+    @Autowired
+    private IZsyzCommonService zsyzCommonService;
     /**
      * 生成项目编号接口
      * @return
@@ -68,6 +73,7 @@ public class ZsyzFjController extends BaseController {
 
     /**
      * 线索指派给承接地的接口
+     * todo 需要短信下发
      * @return
      */
     @PostMapping("/xszp")
@@ -110,4 +116,17 @@ public class ZsyzFjController extends BaseController {
     public AjaxResult xszc(ZsyzSbbzb zsyzSbbzb) {
         return  toAjax(zsyzSbbzbService.updateZsyzSbbzbForZc(zsyzSbbzb));
     }
+
+
+
+    /**
+     * 项目审核/驳回接口
+     * 参数是审核建议
+     * @return
+     */
+    @PostMapping("/xssh")
+    public AjaxResult xssh(@RequestBody ZsyzShyj zsyzShyj) {
+        //所有审核需要往审核意见表插入数据
+        return  zsyzCommonService.xssh(zsyzShyj);
+    }
 }

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java

@@ -23,6 +23,8 @@ import com.ruoyi.common.utils.file.MimeTypeUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.system.service.ISysUserService;
 
+import static com.ruoyi.common.constant.CommonConstants.ONE;
+
 /**
  * 个人信息 业务处理
  * 
@@ -97,6 +99,11 @@ public class SysProfileController extends BaseController
         LoginUser loginUser = getLoginUser();
         String userName = loginUser.getUsername();
         String password = loginUser.getPassword();
+        SysUser sysUser = new SysUser();
+        sysUser.setPassword(newPassword);
+        if (ONE.equals(userService.checkStrongPwd(sysUser))) {
+            return error("新密码必须包含数字、大小写字母、特殊符号且大于8位");
+        }
         if (!SecurityUtils.matchesPassword(oldPassword, password))
         {
             return error("修改密码失败,旧密码错误");

+ 34 - 48
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -3,6 +3,8 @@ package com.ruoyi.web.controller.system;
 import java.util.List;
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.sign.RsaUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -31,16 +33,16 @@ import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.service.ISysPostService;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
+import static com.ruoyi.common.constant.CommonConstants.ONE;
 
 /**
  * 用户信息
- * 
+ *
  * @author ruoyi
  */
 @RestController
 @RequestMapping("/system/user")
-public class SysUserController extends BaseController
-{
+public class SysUserController extends BaseController {
     @Autowired
     private ISysUserService userService;
 
@@ -58,8 +60,7 @@ public class SysUserController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:user:list')")
     @GetMapping("/list")
-    public TableDataInfo list(SysUser user)
-    {
+    public TableDataInfo list(SysUser user) {
         startPage();
         List<SysUser> list = userService.selectUserList(user);
         return getDataTable(list);
@@ -68,8 +69,7 @@ public class SysUserController extends BaseController
     @Log(title = "用户管理", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('system:user:export')")
     @PostMapping("/export")
-    public void export(HttpServletResponse response, SysUser user)
-    {
+    public void export(HttpServletResponse response, SysUser user) {
         List<SysUser> list = userService.selectUserList(user);
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
         util.exportExcel(response, list, "用户数据");
@@ -78,8 +78,7 @@ public class SysUserController extends BaseController
     @Log(title = "用户管理", businessType = BusinessType.IMPORT)
     @PreAuthorize("@ss.hasPermi('system:user:import')")
     @PostMapping("/importData")
-    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
-    {
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
         List<SysUser> userList = util.importExcel(file.getInputStream());
         String operName = getUsername();
@@ -88,8 +87,7 @@ public class SysUserController extends BaseController
     }
 
     @PostMapping("/importTemplate")
-    public void importTemplate(HttpServletResponse response)
-    {
+    public void importTemplate(HttpServletResponse response) {
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
         util.importTemplateExcel(response, "用户数据");
     }
@@ -98,16 +96,14 @@ public class SysUserController extends BaseController
      * 根据用户编号获取详细信息
      */
     @PreAuthorize("@ss.hasPermi('system:user:query')")
-    @GetMapping(value = { "/", "/{userId}" })
-    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
-    {
+    @GetMapping(value = {"/", "/{userId}"})
+    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) {
         userService.checkUserDataScope(userId);
         AjaxResult ajax = AjaxResult.success();
         List<SysRole> roles = roleService.selectRoleAll();
         ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
         ajax.put("posts", postService.selectPostAll());
-        if (StringUtils.isNotNull(userId))
-        {
+        if (StringUtils.isNotNull(userId)) {
             SysUser sysUser = userService.selectUserById(userId);
             ajax.put(AjaxResult.DATA_TAG, sysUser);
             ajax.put("postIds", postService.selectPostListByUserId(userId));
@@ -122,20 +118,18 @@ public class SysUserController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:user:add')")
     @Log(title = "用户管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysUser user)
-    {
-        if (!userService.checkUserNameUnique(user))
-        {
+    public AjaxResult add(@Validated @RequestBody SysUser user) {
+        if (!userService.checkUserNameUnique(user)) {
             return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
-        }
-        else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
-        {
+        } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) {
             return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
+        } else if (ONE.equals(userService.checkStrongPwd(user))) {
+            return AjaxResult.error("密码必须包含数字、大小写字母、特殊符号且大于8位");
         }
-        else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
+/*        else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
         {
             return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
-        }
+        }*/
         user.setCreateBy(getUsername());
         user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
         return toAjax(userService.insertUser(user));
@@ -147,22 +141,18 @@ public class SysUserController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysUser user)
-    {
+    public AjaxResult edit(@Validated @RequestBody SysUser user) {
         userService.checkUserAllowed(user);
         userService.checkUserDataScope(user.getUserId());
-        if (!userService.checkUserNameUnique(user))
-        {
+        if (!userService.checkUserNameUnique(user)) {
             return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
-        }
-        else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
-        {
+        } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) {
             return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
         }
-        else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
+/*        else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
         {
             return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
-        }
+        }*/
         user.setUpdateBy(getUsername());
         return toAjax(userService.updateUser(user));
     }
@@ -173,10 +163,8 @@ public class SysUserController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:user:remove')")
     @Log(title = "用户管理", businessType = BusinessType.DELETE)
     @DeleteMapping("/{userIds}")
-    public AjaxResult remove(@PathVariable Long[] userIds)
-    {
-        if (ArrayUtils.contains(userIds, getUserId()))
-        {
+    public AjaxResult remove(@PathVariable Long[] userIds) {
+        if (ArrayUtils.contains(userIds, getUserId())) {
             return error("当前用户不能删除");
         }
         return toAjax(userService.deleteUserByIds(userIds));
@@ -188,9 +176,11 @@ public class SysUserController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
     @PutMapping("/resetPwd")
-    public AjaxResult resetPwd(@RequestBody SysUser user)
-    {
+    public AjaxResult resetPwd(@RequestBody SysUser user) {
         userService.checkUserAllowed(user);
+        if (ONE.equals(userService.checkStrongPwd(user))) {
+            return AjaxResult.error("密码必须包含数字、大小写字母、特殊符号且大于8位");
+        }
         userService.checkUserDataScope(user.getUserId());
         user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
         user.setUpdateBy(getUsername());
@@ -203,8 +193,7 @@ public class SysUserController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
     @PutMapping("/changeStatus")
-    public AjaxResult changeStatus(@RequestBody SysUser user)
-    {
+    public AjaxResult changeStatus(@RequestBody SysUser user) {
         userService.checkUserAllowed(user);
         userService.checkUserDataScope(user.getUserId());
         user.setUpdateBy(getUsername());
@@ -216,8 +205,7 @@ public class SysUserController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:user:query')")
     @GetMapping("/authRole/{userId}")
-    public AjaxResult authRole(@PathVariable("userId") Long userId)
-    {
+    public AjaxResult authRole(@PathVariable("userId") Long userId) {
         AjaxResult ajax = AjaxResult.success();
         SysUser user = userService.selectUserById(userId);
         List<SysRole> roles = roleService.selectRolesByUserId(userId);
@@ -232,8 +220,7 @@ public class SysUserController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
     @Log(title = "用户管理", businessType = BusinessType.GRANT)
     @PutMapping("/authRole")
-    public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
-    {
+    public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
         userService.checkUserDataScope(userId);
         userService.insertUserAuth(userId, roleIds);
         return success();
@@ -244,8 +231,7 @@ public class SysUserController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:user:list')")
     @GetMapping("/deptTree")
-    public AjaxResult deptTree(SysDept dept)
-    {
+    public AjaxResult deptTree(SysDept dept) {
         return success(deptService.selectDeptTreeList(dept));
     }
 }

+ 5 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java

@@ -1,3 +1,4 @@
+/*
 package com.ruoyi.web.controller.tool;
 
 import java.util.ArrayList;
@@ -22,11 +23,13 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 
+*/
 /**
  * swagger 用户测试方法
  * 
  * @author ruoyi
- */
+ *//*
+
 @Api("用户信息管理")
 @RestController
 @RequestMapping("/test/user")
@@ -181,3 +184,4 @@ class UserEntity
         this.mobile = mobile;
     }
 }
+*/

+ 37 - 15
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java

@@ -1,3 +1,4 @@
+/*
 package com.ruoyi.web.core.config;
 
 import java.util.ArrayList;
@@ -22,29 +23,39 @@ import springfox.documentation.spi.DocumentationType;
 import springfox.documentation.spi.service.contexts.SecurityContext;
 import springfox.documentation.spring.web.plugins.Docket;
 
+*/
 /**
  * Swagger2的接口配置
  * 
  * @author ruoyi
- */
+ *//*
+
 @Configuration
 public class SwaggerConfig
 {
-    /** 系统基础配置 */
+    */
+/** 系统基础配置 *//*
+
     @Autowired
     private RuoYiConfig ruoyiConfig;
 
-    /** 是否开启swagger */
+    */
+/** 是否开启swagger *//*
+
     @Value("${swagger.enabled}")
     private boolean enabled;
 
-    /** 设置请求的统一前缀 */
+    */
+/** 设置请求的统一前缀 *//*
+
     @Value("${swagger.pathMapping}")
     private String pathMapping;
 
-    /**
+    */
+/**
      * 创建API
-     */
+     *//*
+
     @Bean
     public Docket createRestApi()
     {
@@ -62,15 +73,19 @@ public class SwaggerConfig
                 // 扫描所有 .apis(RequestHandlerSelectors.any())
                 .paths(PathSelectors.any())
                 .build()
-                /* 设置安全模式,swagger可以设置访问token */
+                */
+/* 设置安全模式,swagger可以设置访问token *//*
+
                 .securitySchemes(securitySchemes())
                 .securityContexts(securityContexts())
                 .pathMapping(pathMapping);
     }
 
-    /**
+    */
+/**
      * 安全模式,这里指定token通过Authorization头请求头传递
-     */
+     *//*
+
     private List<SecurityScheme> securitySchemes()
     {
         List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
@@ -78,9 +93,11 @@ public class SwaggerConfig
         return apiKeyList;
     }
 
-    /**
+    */
+/**
      * 安全上下文
-     */
+     *//*
+
     private List<SecurityContext> securityContexts()
     {
         List<SecurityContext> securityContexts = new ArrayList<>();
@@ -92,9 +109,11 @@ public class SwaggerConfig
         return securityContexts;
     }
 
-    /**
+    */
+/**
      * 默认的安全上引用
-     */
+     *//*
+
     private List<SecurityReference> defaultAuth()
     {
         AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
@@ -105,9 +124,11 @@ public class SwaggerConfig
         return securityReferences;
     }
 
-    /**
+    */
+/**
      * 添加摘要信息
-     */
+     *//*
+
     private ApiInfo apiInfo()
     {
         // 用ApiInfoBuilder进行定制
@@ -123,3 +144,4 @@ public class SwaggerConfig
                 .build();
     }
 }
+*/

+ 6 - 0
ruoyi-common/pom.xml

@@ -17,6 +17,12 @@
 
     <dependencies>
 
+        <!--阿里短信服务-->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>dysmsapi20170525</artifactId>
+            <version>2.0.23</version>
+        </dependency>
         <!-- Spring框架基本的核心工具 -->
         <dependency>
             <groupId>org.springframework</groupId>

+ 16 - 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/CommonConstants.java

@@ -12,6 +12,22 @@ public class CommonConstants {
     public static final String XMBH = "xmbh:";
     //项目编号头
     public static final String ZS = "ZS";
+    //数字常量
     public static final String ONE = "1";
     public static final String TWO = "2";
+    public static final String THR = "3";
+    public static final String FOR = "4";
+    public static final String FIV = "5";
+    public static final String SIX = "6";
+    public static final String SEV = "7";
+    public static final String EIG = "8";
+    public static final String NIN = "9";
+    public static final String TEN = "10";
+    public static final String ELE = "11";
+    public static final String TWE = "12";
+    //项目进度
+    public static final String  XMJD_XS= "线索阶段";
+    public static final String  XMJD_QY= "签约阶段";
+    public static final String  XMJD_KG= "开工阶段";
+    public static final String  XMJD_TC= "投产阶段";
 }

+ 111 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/PwdCheckUtil.java

@@ -0,0 +1,111 @@
+package com.ruoyi.common.utils;
+
+/**
+ * @Author: tjf
+ * @Date: 2022/10/10 9:24
+ * @Describe:
+ */
+public class PwdCheckUtil {
+    //定义特殊字符
+    public static String SPECIAL_CHAR = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
+
+    /**
+     * @brief   检测密码中字符长度
+     * @param[in] password            密码字符串
+     * @return  符合长度要求 返回true
+     */
+    public static boolean checkPasswordLength(String password, String minNum, String maxNum) {
+        boolean flag =false;
+        if (StringUtils.isBlank(maxNum))  {
+            minNum = StringUtils.isBlank(minNum) ? "0":minNum;
+            if (password.length() >= Integer.parseInt(minNum)) {
+                flag = true;
+            }
+        } else {
+            minNum = StringUtils.isBlank(minNum) ? "0":minNum;
+            if (password.length() >= Integer.parseInt(minNum) &&
+                    password.length() <= Integer.parseInt(maxNum)) {
+                flag = true;
+            }
+        }
+        return flag;
+    }
+
+    /**
+     * @brief   检测密码中是否包含数字
+     * @param[in] password            密码字符串
+     * @return  包含数字 返回true
+     */
+    public static boolean checkContainDigit(String password) {
+        char[] chPass = password.toCharArray();
+        for (int i = 0; i < chPass.length; i++) {
+            if (Character.isDigit(chPass[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @brief   检测密码中是否包含字母(不区分大小写)
+     * @param[in] password            密码字符串
+     * @return  包含字母 返回true
+     */
+    public static boolean checkContainCase(String password) {
+        char[] chPass = password.toCharArray();
+        for (int i = 0; i < chPass.length; i++) {
+            if (Character.isLetter(chPass[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * @brief   检测密码中是否包含小写字母
+     * @param[in] password            密码字符串
+     * @return  包含小写字母 返回true
+     */
+    public static boolean checkContainLowerCase(String password) {
+        char[] chPass = password.toCharArray();
+        for (int i = 0; i < chPass.length; i++) {
+            if (Character.isLowerCase(chPass[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * @brief   检测密码中是否包含大写字母
+     * @param[in] password            密码字符串
+     * @return  包含大写字母 返回true
+     */
+    public static boolean checkContainUpperCase(String password) {
+        char[] chPass = password.toCharArray();
+        for (int i = 0; i < chPass.length; i++) {
+            if (Character.isUpperCase(chPass[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * @brief   检测密码中是否包含特殊符号
+     * @param[in] password            密码字符串
+     * @return  包含特殊符号 返回true
+     */
+    public static boolean checkContainSpecialChar(String password) {
+        char[] chPass = password.toCharArray();
+        for (int i = 0; i < chPass.length; i++) {
+            if (SPECIAL_CHAR.indexOf(chPass[i]) != -1) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

+ 72 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/SendSmsUtils.java

@@ -0,0 +1,72 @@
+package com.ruoyi.common.utils;
+
+
+import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
+import com.aliyun.teautil.models.RuntimeOptions;
+
+/**
+ * @author tjf
+ * @Date: 2021/07/15/10:21
+ */
+public class SendSmsUtils {
+    //短信参数
+    static final String ACCESS_KEY_ID = "LTAI5tNA2fcBJH6EWRH6Pxr6";
+    static final String ACCESS_KEY_SECRET = "5WdaPEOvC3u9LC7pwy2DQ9pgmJvgUr";
+
+
+    //生成X位验证码
+    public static String getCode(Integer num) {
+        String[] codes = {"1", "2", "3", "4", "5", "6", "7", "8", "9"};
+        StringBuilder code = new StringBuilder();
+        for (int i = 0; i < num; i++) {
+            int j = (int) (Math.random() * 10);
+            code.append(codes[j]);
+        }
+        return code.toString();
+    }
+
+    /**
+     * 使用AK&SK初始化账号Client
+     *
+     * @return Client
+     * @throws Exception
+     */
+    public static com.aliyun.dysmsapi20170525.Client createClient() throws Exception {
+        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
+                // 必填,您的 AccessKey ID
+                .setAccessKeyId(ACCESS_KEY_ID)
+                // 必填,您的 AccessKey Secret
+                .setAccessKeySecret(ACCESS_KEY_SECRET);
+        // 访问的域名
+        config.endpoint = "dysmsapi.aliyuncs.com";
+        return new com.aliyun.dysmsapi20170525.Client(config);
+    }
+
+    /**
+     * 发送注册的随机密码
+     *
+     * @return
+     */
+    public static String sendPassword(String password,String phone,String templateCode) {
+        String code = "";
+        try {
+            // 工程代码泄露可能会导致AccessKey泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/378657.html
+            com.aliyun.dysmsapi20170525.Client client = SendSmsUtils.createClient();
+            String smsCode = "{\"password\":\"" + password + "\"}";
+            com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest()
+                    //手机号码
+                    .setPhoneNumbers(phone)
+                    //短信签名名称。潜山市数据资源局
+                    .setSignName("中新云")
+                    //短信模板CODE
+                    .setTemplateCode(templateCode)
+                    //短信模板变量对应的实际值{"name": code}
+                    .setTemplateParam(smsCode);
+            // 复制代码运行请自行打印 API 的返回值
+            SendSmsResponse sendSmsResponse = client.sendSmsWithOptions(sendSmsRequest, new RuntimeOptions());
+            code = sendSmsResponse.getBody().code;
+        } catch (Exception _error) {
+        }
+        return code;
+    }
+}

+ 154 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/RsaUtils.java

@@ -0,0 +1,154 @@
+package com.ruoyi.common.utils.sign;
+
+import org.apache.commons.codec.binary.Base64;
+
+import javax.crypto.Cipher;
+import java.security.*;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+
+/**
+ * RSA加密解密
+ *
+ * @author ruoyi
+ **/
+public class RsaUtils
+{
+    // Rsa 私钥
+    public static String privateKey = "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY"
+            + "7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN"
+            + "PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA"
+            + "kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow"
+            + "cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv"
+            + "DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh"
+            + "YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3"
+            + "UP8iWi1Qw0Y=";
+
+    /**
+     * 私钥解密
+     *
+     * @param privateKeyString 私钥
+     * @param text 待解密的文本
+     * @return 解密后的文本
+     */
+    public static String decryptByPrivateKey(String text) throws Exception
+    {
+        return decryptByPrivateKey(privateKey, text);
+    }
+
+    /**
+     * 公钥解密
+     *
+     * @param publicKeyString 公钥
+     * @param text 待解密的信息
+     * @return 解密后的文本
+     */
+    public static String decryptByPublicKey(String publicKeyString, String text) throws Exception
+    {
+        X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.DECRYPT_MODE, publicKey);
+        byte[] result = cipher.doFinal(Base64.decodeBase64(text));
+        return new String(result);
+    }
+
+    /**
+     * 私钥加密
+     *
+     * @param privateKeyString 私钥
+     * @param text 待加密的信息
+     * @return 加密后的文本
+     */
+    public static String encryptByPrivateKey(String privateKeyString, String text) throws Exception
+    {
+        PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.ENCRYPT_MODE, privateKey);
+        byte[] result = cipher.doFinal(text.getBytes());
+        return Base64.encodeBase64String(result);
+    }
+
+    /**
+     * 私钥解密
+     *
+     * @param privateKeyString 私钥
+     * @param text 待解密的文本
+     * @return 解密后的文本
+     */
+    public static String decryptByPrivateKey(String privateKeyString, String text) throws Exception
+    {
+        PKCS8EncodedKeySpec pkcs8EncodedKeySpec5 = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec5);
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.DECRYPT_MODE, privateKey);
+        byte[] result = cipher.doFinal(Base64.decodeBase64(text));
+        return new String(result);
+    }
+
+    /**
+     * 公钥加密
+     *
+     * @param publicKeyString 公钥
+     * @param text 待加密的文本
+     * @return 加密后的文本
+     */
+    public static String encryptByPublicKey(String publicKeyString, String text) throws Exception
+    {
+        X509EncodedKeySpec x509EncodedKeySpec2 = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
+        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+        PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec2);
+        Cipher cipher = Cipher.getInstance("RSA");
+        cipher.init(Cipher.ENCRYPT_MODE, publicKey);
+        byte[] result = cipher.doFinal(text.getBytes());
+        return Base64.encodeBase64String(result);
+    }
+
+    /**
+     * 构建RSA密钥对
+     *
+     * @return 生成后的公私钥信息
+     */
+    public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmException
+    {
+        KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
+        keyPairGenerator.initialize(1024);
+        KeyPair keyPair = keyPairGenerator.generateKeyPair();
+        RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
+        RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
+        String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
+        String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
+        return new RsaKeyPair(publicKeyString, privateKeyString);
+    }
+
+    /**
+     * RSA密钥对对象
+     */
+    public static class RsaKeyPair
+    {
+        private final String publicKey;
+        private final String privateKey;
+
+        public RsaKeyPair(String publicKey, String privateKey)
+        {
+            this.publicKey = publicKey;
+            this.privateKey = privateKey;
+        }
+
+        public String getPublicKey()
+        {
+            return publicKey;
+        }
+
+        public String getPrivateKey()
+        {
+            return privateKey;
+        }
+    }
+}

+ 7 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java

@@ -1,6 +1,8 @@
 package com.ruoyi.framework.web.service;
 
 import javax.annotation.Resource;
+
+import com.ruoyi.common.utils.sign.RsaUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.authentication.BadCredentialsException;
@@ -65,6 +67,11 @@ public class SysLoginService
     {
         // 验证码校验
         validateCaptcha(username, code, uuid);
+        try {
+            password =  RsaUtils.decryptByPrivateKey(password);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
         // 登录前置校验
         loginPreCheck(username, password);
         // 用户验证

+ 3 - 3
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/ZsyzShyj.java

@@ -27,11 +27,11 @@ public class ZsyzShyj extends BaseEntity
     private String xmbh;
 
     /** 审核人id */
-    @Excel(name = "审核人id")
+    @Excel(name = "审核人id 部门id")
     private Long shrId;
 
     /** 审核人姓名 */
-    @Excel(name = "审核人姓名")
+    @Excel(name = "审核人姓名 部门名称")
     private String shrxm;
 
     /** 项目阶段 */
@@ -39,7 +39,7 @@ public class ZsyzShyj extends BaseEntity
     private String xmjd;
 
     /** 审核结果(是否通过  1:通过,2:拒绝) */
-    @Excel(name = "审核结果", readConverterExp = "是=否通过,1=:通过,2:拒绝")
+    @Excel(name = "审核结果", readConverterExp = "1=通过,2=拒绝")
     private String shjg;
 
     /** 审核意见 */

+ 125 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/projectV2/common/SendSms.java

@@ -0,0 +1,125 @@
+package com.ruoyi.system.domain.projectV2.common;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 短信日志对象 send_sms
+ * 
+ * @author ruoyi
+ * @date 2023-02-24
+ */
+public class SendSms extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 接收人姓名  */
+    @Excel(name = "接收人姓名")
+    private String name;
+
+    /** 发送的手机号 */
+    @Excel(name = "发送的手机号")
+    private String phone;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String status;
+
+    /** 发送内容 */
+    @Excel(name = "发送内容")
+    private String content;
+
+    /** 修改时间 */
+    @Excel(name = "修改时间")
+    private String modifyDate;
+
+    /** 是否删除 */
+    @Excel(name = "是否删除")
+    private String isDel;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setPhone(String phone) 
+    {
+        this.phone = phone;
+    }
+
+    public String getPhone() 
+    {
+        return phone;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setContent(String content) 
+    {
+        this.content = content;
+    }
+
+    public String getContent() 
+    {
+        return content;
+    }
+    public void setModifyDate(String modifyDate) 
+    {
+        this.modifyDate = modifyDate;
+    }
+
+    public String getModifyDate() 
+    {
+        return modifyDate;
+    }
+    public void setIsDel(String isDel) 
+    {
+        this.isDel = isDel;
+    }
+
+    public String getIsDel() 
+    {
+        return isDel;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("name", getName())
+            .append("phone", getPhone())
+            .append("status", getStatus())
+            .append("content", getContent())
+            .append("modifyDate", getModifyDate())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("isDel", getIsDel())
+            .toString();
+    }
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/projectV2/ZsyzSbbzbMapper.java

@@ -46,6 +46,8 @@ public interface ZsyzSbbzbMapper
     public int updateZsyzSbbzbCjd(ZsyzSbbzb zsyzSbbzb);
     //线索暂存/终止接口
     public int updateZsyzSbbzbForZc(ZsyzSbbzb zsyzSbbzb);
+    //更改项目进度
+    public int updateZsyzSbbzbProgress(ZsyzSbbzb zsyzSbbzb);
 
     /**
      * 删除招商引资_申报_首谈信息_主

+ 62 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/projectV2/common/SendSmsMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper.projectV2.common;
+
+import com.ruoyi.system.domain.projectV2.common.SendSms;
+
+import java.util.List;
+
+/**
+ * 短信日志Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-24
+ */
+public interface SendSmsMapper 
+{
+    /**
+     * 查询短信日志
+     * 
+     * @param id 短信日志ID
+     * @return 短信日志
+     */
+    public SendSms selectSendSmsById(Long id);
+
+    /**
+     * 查询短信日志列表
+     * 
+     * @param sendSms 短信日志
+     * @return 短信日志集合
+     */
+    public List<SendSms> selectSendSmsList(SendSms sendSms);
+
+    /**
+     * 新增短信日志
+     * 
+     * @param sendSms 短信日志
+     * @return 结果
+     */
+    public int insertSendSms(SendSms sendSms);
+
+    /**
+     * 修改短信日志
+     * 
+     * @param sendSms 短信日志
+     * @return 结果
+     */
+    public int updateSendSms(SendSms sendSms);
+
+    /**
+     * 删除短信日志
+     * 
+     * @param id 短信日志ID
+     * @return 结果
+     */
+    public int deleteSendSmsById(Long id);
+
+    /**
+     * 批量删除短信日志
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteSendSmsByIds(Long[] ids);
+}

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java

@@ -90,6 +90,13 @@ public interface ISysUserService
      */
     public boolean checkEmailUnique(SysUser user);
 
+    /**
+     * 校验强密码
+     * @param user
+     * @return
+     */
+    public String checkStrongPwd(SysUser user);
+
     /**
      * 校验用户是否允许操作
      * 

+ 29 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -4,6 +4,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 import javax.validation.Validator;
+
+import com.ruoyi.common.utils.PwdCheckUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +32,9 @@ import com.ruoyi.system.mapper.SysUserRoleMapper;
 import com.ruoyi.system.service.ISysConfigService;
 import com.ruoyi.system.service.ISysUserService;
 
+import static com.ruoyi.common.constant.CommonConstants.ONE;
+import static com.ruoyi.common.constant.CommonConstants.TWO;
+
 /**
  * 用户 业务层处理
  * 
@@ -212,6 +217,30 @@ public class SysUserServiceImpl implements ISysUserService
         return UserConstants.UNIQUE;
     }
 
+    /**
+     * @brief   检测密码复杂度是否为 强
+     * @param[in] password  密码字符串
+     * @return  符合长度要求 返回true
+     */
+    @Override
+    public  String checkStrongPwd(SysUser user) {
+        String pwd = user.getPassword();
+        String result = TWO;
+        try {
+            if (!PwdCheckUtil.checkPasswordLength(pwd, "8", "16")
+                    || !PwdCheckUtil.checkContainLowerCase(pwd)
+                    || !PwdCheckUtil.checkContainUpperCase(pwd)
+                    || !PwdCheckUtil.checkContainDigit(pwd)
+                    || !PwdCheckUtil.checkContainSpecialChar(pwd)
+            ) {
+                result = ONE;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
     /**
      * 校验用户是否允许操作
      * 

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/common/SendSmsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl.projectV2.common;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.projectV2.common.SendSms;
+import com.ruoyi.system.mapper.projectV2.common.SendSmsMapper;
+import com.ruoyi.system.service.projectV2.common.ISendSmsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 短信日志Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-02-24
+ */
+@Service
+public class SendSmsServiceImpl implements ISendSmsService
+{
+    @Autowired
+    private SendSmsMapper sendSmsMapper;
+
+    /**
+     * 查询短信日志
+     * 
+     * @param id 短信日志ID
+     * @return 短信日志
+     */
+    @Override
+    public SendSms selectSendSmsById(Long id)
+    {
+        return sendSmsMapper.selectSendSmsById(id);
+    }
+
+    /**
+     * 查询短信日志列表
+     * 
+     * @param sendSms 短信日志
+     * @return 短信日志
+     */
+    @Override
+    public List<SendSms> selectSendSmsList(SendSms sendSms)
+    {
+        return sendSmsMapper.selectSendSmsList(sendSms);
+    }
+
+    /**
+     * 新增短信日志
+     * 
+     * @param sendSms 短信日志
+     * @return 结果
+     */
+    @Override
+    public int insertSendSms(SendSms sendSms)
+    {
+        sendSms.setCreateTime(DateUtils.getNowDate());
+        return sendSmsMapper.insertSendSms(sendSms);
+    }
+
+    /**
+     * 修改短信日志
+     * 
+     * @param sendSms 短信日志
+     * @return 结果
+     */
+    @Override
+    public int updateSendSms(SendSms sendSms)
+    {
+        sendSms.setUpdateTime(DateUtils.getNowDate());
+        return sendSmsMapper.updateSendSms(sendSms);
+    }
+
+    /**
+     * 批量删除短信日志
+     * 
+     * @param ids 需要删除的短信日志ID
+     * @return 结果
+     */
+    @Override
+    public int deleteSendSmsByIds(Long[] ids)
+    {
+        return sendSmsMapper.deleteSendSmsByIds(ids);
+    }
+
+    /**
+     * 删除短信日志信息
+     * 
+     * @param id 短信日志ID
+     * @return 结果
+     */
+    @Override
+    public int deleteSendSmsById(Long id)
+    {
+        return sendSmsMapper.deleteSendSmsById(id);
+    }
+}

+ 107 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/projectV2/common/ZsyzCommonServiceImpL.java

@@ -0,0 +1,107 @@
+package com.ruoyi.system.service.impl.projectV2.common;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
+import com.ruoyi.system.domain.projectV2.ZsyzShyj;
+import com.ruoyi.system.mapper.projectV2.ZsyzSbbzbMapper;
+import com.ruoyi.system.mapper.projectV2.ZsyzShyjMapper;
+import com.ruoyi.system.service.projectV2.common.IZsyzCommonService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import static com.ruoyi.common.constant.CommonConstants.*;
+
+/**
+ * 公共
+ *
+ * @Author: tjf
+ * @Date: 2023/2/24 10:53
+ * @Describe:
+ */
+@Service
+public class ZsyzCommonServiceImpL implements IZsyzCommonService {
+    @Autowired
+    private ZsyzShyjMapper zsyzShyjMapper;
+
+    @Autowired
+    private ZsyzSbbzbMapper zsyzSbbzbMapper;
+
+    //主要功能, 对线索进度进行控制
+    @Override
+    public AjaxResult xssh(ZsyzShyj zsyzShyj) {
+        //获取审核结果
+        String shjg = zsyzShyj.getShjg();
+        //往审核意见表插入数据
+        LoginUser loginUser = SecurityUtils.getLoginUser();
+        SysDept dept = loginUser.getUser().getDept();
+        zsyzShyj.setShrId(dept.getDeptId());
+        zsyzShyj.setShrxm(dept.getDeptName());
+        //判断项目阶段
+        String progress = zsyzShyj.getXmjd();
+        zsyzShyj.setXmjd(xmjd(progress));
+        zsyzShyjMapper.insertZsyzShyj(zsyzShyj);
+        ZsyzSbbzb zsyzSbbzb = new ZsyzSbbzb();
+        zsyzSbbzb.setId(zsyzShyj.getXmId());
+        if (ONE.equals(shjg)) {
+            //通过
+            //审核通过需要进入下一阶段/要素部门审核通过,不进行进度前进
+            //判断项目进度
+            zsyzSbbzb.setProgress(changeProgress(progress));
+            zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
+        }else if (TWO.equals(shjg)){
+            //驳回
+            zsyzSbbzb.setProgress(changeProgressBack(progress));
+            zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
+        }
+        return AjaxResult.success();
+    }
+
+    //更改项目进度前进
+    public String changeProgress(String progress) {
+        if (ONE.equals(progress)){
+            progress = TWO;
+        }else if (FOR.equals(progress)){
+            progress = FIV;
+        }else if (SIX.equals(progress)){
+            progress = SEV;
+        }else if (EIG.equals(progress)){
+            progress = NIN;
+        }else if (TEN.equals(progress)){
+            progress = ELE;
+        }//项目入归暂时保留
+        return progress;
+    }
+
+    //更改项目进度后退
+    public String changeProgressBack(String progress) {
+        if (TWO.equals(progress)){
+            progress = ONE;
+        }else if (FOR.equals(progress)){
+            progress = TWO;
+        }else if (SIX.equals(progress)){
+            progress = FIV;
+        }else if (EIG.equals(progress)){
+            progress = SEV;
+        }else if (TEN.equals(progress)){
+            progress = NIN;
+        }//项目入归暂时保留
+        return progress;
+    }
+
+        //根据项目进度判断项目阶段
+    public String xmjd(String code) {
+        if (ONE.equals(code) || TWO.equals(code) || THR.equals(code) || FOR.equals(code) || FIV.equals(code)) {
+            return "线索阶段";
+        } else if (SIX.equals(code) || SEV.equals(code)) {
+            return "签约阶段";
+        } else if (EIG.equals(code) || NIN.equals(code)) {
+            return "开工阶段";
+        } else if (TEN.equals(code) || ELE.equals(code)) {
+            return "投产阶段";
+        }
+        return "入归阶段";
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/common/ISendSmsService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service.projectV2.common;
+
+
+import com.ruoyi.system.domain.projectV2.common.SendSms;
+
+import java.util.List;
+
+/**
+ * 短信日志Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-24
+ */
+public interface ISendSmsService 
+{
+    /**
+     * 查询短信日志
+     * 
+     * @param id 短信日志ID
+     * @return 短信日志
+     */
+    public SendSms selectSendSmsById(Long id);
+
+    /**
+     * 查询短信日志列表
+     * 
+     * @param sendSms 短信日志
+     * @return 短信日志集合
+     */
+    public List<SendSms> selectSendSmsList(SendSms sendSms);
+
+    /**
+     * 新增短信日志
+     * 
+     * @param sendSms 短信日志
+     * @return 结果
+     */
+    public int insertSendSms(SendSms sendSms);
+
+    /**
+     * 修改短信日志
+     * 
+     * @param sendSms 短信日志
+     * @return 结果
+     */
+    public int updateSendSms(SendSms sendSms);
+
+    /**
+     * 批量删除短信日志
+     * 
+     * @param ids 需要删除的短信日志ID
+     * @return 结果
+     */
+    public int deleteSendSmsByIds(Long[] ids);
+
+    /**
+     * 删除短信日志信息
+     * 
+     * @param id 短信日志ID
+     * @return 结果
+     */
+    public int deleteSendSmsById(Long id);
+}

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/projectV2/common/IZsyzCommonService.java

@@ -0,0 +1,21 @@
+package com.ruoyi.system.service.projectV2.common;
+
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
+import com.ruoyi.system.domain.projectV2.ZsyzShyj;
+import com.ruoyi.system.domain.projectV2.common.SendSms;
+
+import java.util.List;
+
+/**
+ * 公共Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-02-24
+ */
+public interface IZsyzCommonService
+{
+    //主要功能, 对线索进度进行控制
+  public AjaxResult xssh(ZsyzShyj zsyzShyj);
+}

+ 4 - 1
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzSbbzbMapper.xml

@@ -96,7 +96,7 @@
             <if test="zw != null  and zw != ''">and zw = #{zw}</if>
             <if test="userId != null ">and user_id = #{userId}</if>
             <if test="type != null  and type != ''">and type = #{type}</if>
-            <if test="progress != null  and progress != ''">and progress = #{progress}</if>
+            <if test="progress != null  and progress != ''">and progress in (#{progress}) </if>
             <if test="deptId != null ">and dept_id = #{deptId}</if>
             <if test="isDel != null  and isDel != ''">and is_del = #{isDel}</if>
             <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
@@ -274,6 +274,9 @@
         </trim>
       where id = #{id}
     </update>
+    <update id="updateZsyzSbbzbProgress" parameterType="ZsyzSbbzb">
+         update zsyz_sbbzb set progress = #{progress} where id = #{id}
+    </update>
 
     <delete id="deleteZsyzSbbzbById" parameterType="Long">
         delete from zsyz_sbbzb where id = #{id}

+ 2 - 2
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzShyjMapper.xml

@@ -56,10 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="shyj != null">shyj,</if>
             <if test="shsj != null">shsj,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            create_time
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="xmId != null">#{xmId},</if>
@@ -71,10 +71,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="shyj != null">#{shyj},</if>
             <if test="shsj != null">#{shsj},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            sysdate()
          </trim>
     </insert>
 

+ 101 - 0
ruoyi-system/src/main/resources/mapper/system/projectV2/common/SendSmsMapper.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.projectV2.common.SendSmsMapper">
+    
+    <resultMap type="com.ruoyi.system.domain.projectV2.common.SendSms" id="SendSmsResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="phone"    column="phone"    />
+        <result property="status"    column="status"    />
+        <result property="content"    column="content"    />
+        <result property="modifyDate"    column="modify_date"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="isDel"    column="is_del"    />
+    </resultMap>
+
+    <sql id="selectSendSmsVo">
+        select id, name, phone, status, content, modify_date, create_by, create_time, update_by, update_time, is_del from send_sms
+    </sql>
+
+    <select id="selectSendSmsList" parameterType="com.ruoyi.system.domain.projectV2.common.SendSms" resultMap="SendSmsResult">
+        <include refid="selectSendSmsVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="content != null  and content != ''"> and content = #{content}</if>
+            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+            </if>
+        </where>
+    </select>
+    
+    <select id="selectSendSmsById" parameterType="Long" resultMap="SendSmsResult">
+        <include refid="selectSendSmsVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSendSms" parameterType="com.ruoyi.system.domain.projectV2.common.SendSms" useGeneratedKeys="true" keyProperty="id">
+        insert into send_sms
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
+            <if test="phone != null">phone,</if>
+            <if test="status != null">status,</if>
+            <if test="content != null">content,</if>
+            <if test="modifyDate != null">modify_date,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="isDel != null and isDel != ''">is_del,</if>
+            create_time
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="status != null">#{status},</if>
+            <if test="content != null">#{content},</if>
+            <if test="modifyDate != null">#{modifyDate},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="isDel != null and isDel != ''">#{isDel},</if>
+            sysdate()
+         </trim>
+    </insert>
+
+    <update id="updateSendSms" parameterType="com.ruoyi.system.domain.projectV2.common.SendSms">
+        update send_sms
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="content != null">content = #{content},</if>
+            <if test="modifyDate != null">modify_date = #{modifyDate},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSendSmsById" parameterType="Long">
+        delete from send_sms where id = #{id}
+    </delete>
+
+    <delete id="deleteSendSmsByIds" parameterType="String">
+        delete from send_sms where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>