瀏覽代碼

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_scrm_java

caoliqin 1 月之前
父節點
當前提交
879df8a771
共有 22 個文件被更改,包括 194 次插入243 次删除
  1. 1 0
      fs-admin/src/main/java/com/fs/company/controller/CompanyController.java
  2. 2 2
      fs-admin/src/main/resources/application.yml
  3. 0 6
      fs-company/src/main/java/com/fs/wxuser/CompanyWxUserController.java
  4. 1 1
      fs-company/src/main/resources/application.yml
  5. 2 2
      fs-qw-api/src/main/resources/application.yml
  6. 2 2
      fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java
  7. 2 2
      fs-qw-task/src/main/resources/application.yml
  8. 1 0
      fs-service-system/src/main/java/com/fs/company/domain/CompanyMoneyLogs.java
  9. 3 148
      fs-service-system/src/main/java/com/fs/company/domain/CompanyRecharge.java
  10. 0 1
      fs-service-system/src/main/java/com/fs/company/domain/CompanyUser.java
  11. 1 0
      fs-service-system/src/main/java/com/fs/company/param/CompanyRechargeParam.java
  12. 3 2
      fs-service-system/src/main/java/com/fs/company/service/impl/CompanyRoleServiceImpl.java
  13. 1 0
      fs-service-system/src/main/java/com/fs/company/vo/CompanyRechargeVO.java
  14. 1 1
      fs-service-system/src/main/java/com/fs/course/mapper/HyWatchLogMapper.java
  15. 3 1
      fs-service-system/src/main/java/com/fs/course/service/impl/FsCourseWatchLogServiceImpl.java
  16. 4 3
      fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCoursePeriodDaysServiceImpl.java
  17. 2 0
      fs-service-system/src/main/java/com/fs/qw/domain/QwGroupChatUser.java
  18. 152 68
      fs-service-system/src/main/java/com/fs/statis/service/impl/StatisticsServiceImpl.java
  19. 5 1
      fs-service-system/src/main/resources/mapper/company/CompanyMoneyLogsMapper.xml
  20. 6 1
      fs-service-system/src/main/resources/mapper/company/CompanyRechargeMapper.xml
  21. 1 1
      fs-service-system/src/main/resources/mapper/company/CompanyRoleMapper.xml
  22. 1 1
      fs-service-system/src/main/resources/mapper/sop/SopUserLogsInfoMapper.xml

+ 1 - 0
fs-admin/src/main/java/com/fs/company/controller/CompanyController.java

@@ -224,6 +224,7 @@ public class CompanyController extends BaseController
         recharge.setStatus(0);
         recharge.setRemark(param.getRemark());
         recharge.setPayType(3);
+        recharge.setImgs(param.getImgs());
         rechargeService.insertCompanyRecharge(recharge);
         return R.ok("提交成功,等待审核");
 

+ 2 - 2
fs-admin/src/main/resources/application.yml

@@ -46,8 +46,8 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-#    active: dev
-    active: druid-fby
+    active: dev
+#    active: druid-fby
     include: config
   # 文件上传
   servlet:

+ 0 - 6
fs-company/src/main/java/com/fs/wxuser/CompanyWxUserController.java

@@ -37,7 +37,6 @@ public class CompanyWxUserController extends BaseController
     /**
      * 查询【个微管理】列表
      */
-    @PreAuthorize("@ss.hasPermi('system:user:list')")
     @GetMapping("/list")
     public TableDataInfo list(CompanyWxUser companyWxUser)
     {
@@ -49,7 +48,6 @@ public class CompanyWxUserController extends BaseController
     /**
      * 导出【个微管理】列表
      */
-    @PreAuthorize("@ss.hasPermi('system:user:export')")
     @Log(title = "【个微管理】", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(CompanyWxUser companyWxUser)
@@ -62,7 +60,6 @@ public class CompanyWxUserController extends BaseController
     /**
      * 获取【个微管理】详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:user:query')")
     @GetMapping(value = "/{userId}")
     public AjaxResult getInfo(@PathVariable("userId") Long userId)
     {
@@ -72,7 +69,6 @@ public class CompanyWxUserController extends BaseController
     /**
      * 新增【个微管理】
      */
-    @PreAuthorize("@ss.hasPermi('system:user:add')")
     @Log(title = "【个微管理】", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody CompanyWxUser companyWxUser)
@@ -83,7 +79,6 @@ public class CompanyWxUserController extends BaseController
     /**
      * 修改【个微管理】
      */
-    @PreAuthorize("@ss.hasPermi('system:user:edit')")
     @Log(title = "【个微管理】", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody CompanyWxUser companyWxUser)
@@ -94,7 +89,6 @@ public class CompanyWxUserController extends BaseController
     /**
      * 删除【个微管理】
      */
-    @PreAuthorize("@ss.hasPermi('system:user:remove')")
     @Log(title = "【个微管理】", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{userIds}")
     public AjaxResult remove(@PathVariable Long[] userIds)

+ 1 - 1
fs-company/src/main/resources/application.yml

@@ -44,7 +44,7 @@ spring:
     basename: i18n/messages
   profiles:
     active: dev
-    #    active: druid-fby
+#    active: druid-fby
     include: config
   # 文件上传
   servlet:

+ 2 - 2
fs-qw-api/src/main/resources/application.yml

@@ -43,8 +43,8 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: dev
-    #    active: druid-fby
+#    active: dev
+    active: druid-fby
     include: config
   # 文件上传
   servlet:

+ 2 - 2
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -676,9 +676,9 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                 groupChat.getChatUserList().forEach(user -> {
                     ruleTimeVO.setSendType(2);
                     ruleTimeVO.setRemark("客户群催课");
-                    QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, user.getUserId(), user.getName(), null);
+                    QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, user.getId().toString(), user.getName(), null);
                     handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId,
-                            type, qwUserId, companyUserId, companyId, user.getUserId(), welcomeText, qwUserName, null, false);
+                            type, qwUserId, companyUserId, companyId, user.getId().toString(), welcomeText, qwUserName, null, false);
                 });
             }
         } else {

+ 2 - 2
fs-qw-task/src/main/resources/application.yml

@@ -43,8 +43,8 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: dev
-    #    active: druid-fby
+    # active: dev
+    active: druid-fby
     include: config
   # 文件上传
   servlet:

+ 1 - 0
fs-service-system/src/main/java/com/fs/company/domain/CompanyMoneyLogs.java

@@ -42,5 +42,6 @@ public class CompanyMoneyLogs extends BaseEntity
     private String businessId;
 
     private Integer type;
+    private String imgs;
 
 }

+ 3 - 148
fs-service-system/src/main/java/com/fs/company/domain/CompanyRecharge.java

@@ -5,6 +5,7 @@ import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fs.common.annotation.Excel;
 import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -14,6 +15,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * @author fs
  * @date 2023-02-27
  */
+@Data
 public class CompanyRecharge extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -72,152 +74,5 @@ public class CompanyRecharge extends BaseEntity
     private Date auditTime;
 
     private String remark;
-
-    @Override
-    public String getRemark() {
-        return remark;
-    }
-
-    @Override
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public void setRechargeId(Long rechargeId)
-    {
-        this.rechargeId = rechargeId;
-    }
-
-    public Long getRechargeId() 
-    {
-        return rechargeId;
-    }
-    public void setCompanyId(Long companyId) 
-    {
-        this.companyId = companyId;
-    }
-
-    public Long getCompanyId() 
-    {
-        return companyId;
-    }
-    public void setRechargeNo(String rechargeNo) 
-    {
-        this.rechargeNo = rechargeNo;
-    }
-
-    public String getRechargeNo() 
-    {
-        return rechargeNo;
-    }
-    public void setMoney(BigDecimal money) 
-    {
-        this.money = money;
-    }
-
-    public BigDecimal getMoney() 
-    {
-        return money;
-    }
-    public void setPayTime(Date payTime) 
-    {
-        this.payTime = payTime;
-    }
-
-    public Date getPayTime() 
-    {
-        return payTime;
-    }
-    public void setStatus(Integer status) 
-    {
-        this.status = status;
-    }
-
-    public Integer getStatus() 
-    {
-        return status;
-    }
-    public void setPayType(Integer payType) 
-    {
-        this.payType = payType;
-    }
-
-    public Integer getPayType() 
-    {
-        return payType;
-    }
-    public void setTradeNo(String tradeNo) 
-    {
-        this.tradeNo = tradeNo;
-    }
-
-    public String getTradeNo() 
-    {
-        return tradeNo;
-    }
-    public void setBalance(BigDecimal balance) 
-    {
-        this.balance = balance;
-    }
-
-    public BigDecimal getBalance() 
-    {
-        return balance;
-    }
-    public void setCreateUserId(Long createUserId) 
-    {
-        this.createUserId = createUserId;
-    }
-
-    public Long getCreateUserId() 
-    {
-        return createUserId;
-    }
-    public void setIsAudit(Integer isAudit) 
-    {
-        this.isAudit = isAudit;
-    }
-
-    public Integer getIsAudit() 
-    {
-        return isAudit;
-    }
-    public void setAuditUserId(Long auditUserId) 
-    {
-        this.auditUserId = auditUserId;
-    }
-
-    public Long getAuditUserId() 
-    {
-        return auditUserId;
-    }
-    public void setAuditTime(Date auditTime) 
-    {
-        this.auditTime = auditTime;
-    }
-
-    public Date getAuditTime() 
-    {
-        return auditTime;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-            .append("rechargeId", getRechargeId())
-            .append("companyId", getCompanyId())
-            .append("rechargeNo", getRechargeNo())
-            .append("money", getMoney())
-            .append("createTime", getCreateTime())
-            .append("payTime", getPayTime())
-            .append("status", getStatus())
-            .append("payType", getPayType())
-            .append("tradeNo", getTradeNo())
-            .append("balance", getBalance())
-            .append("createUserId", getCreateUserId())
-            .append("isAudit", getIsAudit())
-            .append("auditUserId", getAuditUserId())
-            .append("auditTime", getAuditTime())
-            .toString();
-    }
+    private String imgs;
 }

+ 0 - 1
fs-service-system/src/main/java/com/fs/company/domain/CompanyUser.java

@@ -158,7 +158,6 @@ public class CompanyUser extends BaseEntity
     }
 
     @NotBlank(message = "二级域名不能为空")
-    @Pattern(regexp = "^(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,})|(?:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}))$", message = "域名格式不正确")
     public String getDomain() {
         return domain;
     }

+ 1 - 0
fs-service-system/src/main/java/com/fs/company/param/CompanyRechargeParam.java

@@ -16,5 +16,6 @@ public class CompanyRechargeParam implements Serializable
     private BigDecimal money;
 
     private String remark;
+    private String imgs;
 
 }

+ 3 - 2
fs-service-system/src/main/java/com/fs/company/service/impl/CompanyRoleServiceImpl.java

@@ -126,9 +126,10 @@ public class CompanyRoleServiceImpl implements ICompanyRoleService
 
     @Override
     public String checkRoleNameUnique(CompanyRole role) {
-        Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId();
+        long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId();
+        long companyId = StringUtils.isNull(role.getCompanyId()) ? -1L : role.getCompanyId();
         CompanyRole info = companyRoleMapper.checkRoleNameUnique(role.getRoleName());
-        if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue())
+        if (StringUtils.isNotNull(info) && info.getRoleId() != roleId && info.getCompanyId() != companyId)
         {
             return UserConstants.NOT_UNIQUE;
         }

+ 1 - 0
fs-service-system/src/main/java/com/fs/company/vo/CompanyRechargeVO.java

@@ -67,6 +67,7 @@ public class CompanyRechargeVO implements Serializable {
     private String createUserNickName;
 
     private String auditUserNickName;
+    private String imgs;
 
 }
 

+ 1 - 1
fs-service-system/src/main/java/com/fs/course/mapper/HyWatchLogMapper.java

@@ -81,5 +81,5 @@ public interface HyWatchLogMapper {
             "FROM hy_watch_log WHERE status = #{status}")
     List<HyWatchLog> selectByStatus(@Param("status") Integer status);
 
-    void insertHyWatchLogBatch(List<HyWatchLog> hyWatchLogs);
+    void insertHyWatchLogBatch(@Param("hyWatchLogs") List<HyWatchLog> hyWatchLogs);
 }

+ 3 - 1
fs-service-system/src/main/java/com/fs/course/service/impl/FsCourseWatchLogServiceImpl.java

@@ -709,7 +709,9 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
                         HyWatchLog qwWatchLog = new HyWatchLog();
                         qwWatchLog.setExtId(fsCourseWatchLog.getQwExternalContactId());
                         qwWatchLog.setLineTime(fsCourseWatchLog.getLineTime());
-                        qwWatchLog.setQwUserId(Long.parseLong(fsCourseWatchLog.getQwUserId()));
+                        if(fsCourseWatchLog.getQwUserId() != null) {
+                            qwWatchLog.setQwUserId(Long.parseLong(fsCourseWatchLog.getQwUserId()));
+                        }
                         qwWatchLog.setDay(day);
                         qwWatchLog.setStatus(fsCourseWatchLog.getLogType()==3?0:fsCourseWatchLog.getLogType()==2?2:1);
                         qwWatchLog.setProject(project);

+ 4 - 3
fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCoursePeriodDaysServiceImpl.java

@@ -122,7 +122,7 @@ public class FsUserCoursePeriodDaysServiceImpl extends ServiceImpl<FsUserCourseP
     @Override
     public R addCourse(FsUserCoursePeriodDays entity) {
         FsUserCoursePeriod period = fsUserCoursePeriodMapper.selectFsUserCoursePeriodById(entity.getPeriodId());
-        int num = count(new QueryWrapper<FsUserCoursePeriodDays>().eq("period_id", period.getPeriodId()));
+        List<FsUserCoursePeriodDays> dayList = list(new QueryWrapper<FsUserCoursePeriodDays>().eq("period_id", period.getPeriodId()));
         long days;
         if(period.getPeriodType() == 2){
             days = 1;
@@ -130,12 +130,13 @@ public class FsUserCoursePeriodDaysServiceImpl extends ServiceImpl<FsUserCourseP
             days = DateUtil.differenceTime(period.getPeriodStartingTime(), period.getPeriodEndTime(), TimeTypeEnum.DAY);
         }
         days++;
-        if(num + entity.getVideoIds().size() > days) return R.error("课程不能超过营期范围");
+        if(dayList.size() + entity.getVideoIds().size() > days) return R.error("课程不能超过营期范围");
+        if(dayList.stream().anyMatch(e -> entity.getVideoIds().contains(e.getVideoId()))) return R.error("不能添加相同章节");
         AtomicInteger i = new AtomicInteger(0);
         List<FsUserCoursePeriodDays> collect = entity.getVideoIds().stream().map(e -> {
             FsUserCoursePeriodDays day = new FsUserCoursePeriodDays();
             day.setPeriodId(entity.getPeriodId());
-            day.setLesson(num + i.getAndIncrement());
+            day.setLesson(dayList.size() + i.getAndIncrement());
             day.setDayDate(period.getPeriodStartingTime().plusDays(day.getLesson()));
             day.setCourseId(entity.getCourseId());
             day.setVideoId(e);

+ 2 - 0
fs-service-system/src/main/java/com/fs/qw/domain/QwGroupChatUser.java

@@ -89,5 +89,7 @@ public class QwGroupChatUser extends BaseEntity
     private String inComTime;
     @TableField(exist = false)
     private String tagIds;
+    @TableField(exist = false)
+    private String fsUserId;
 
 }

+ 152 - 68
fs-service-system/src/main/java/com/fs/statis/service/impl/StatisticsServiceImpl.java

@@ -29,6 +29,7 @@ import java.math.RoundingMode;
 import java.time.DayOfWeek;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.TemporalAdjusters;
 import java.util.ArrayList;
@@ -110,30 +111,44 @@ public class StatisticsServiceImpl implements IStatisticsService {
         String startDate = "";
         String endDate = "";
 
-        LocalDate now = LocalDate.now();
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        LocalDateTime now = LocalDateTime.now();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
+        LocalTime startOfDayTime = LocalTime.MIN;
+        LocalTime endOfDayTime = LocalTime.of(23, 59, 59);
 
         if(0 == type){
-            startDate = now.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfDay = now.with(startOfDayTime);
+            LocalDateTime endOfDay = now.with(endOfDayTime);
+            startDate = startOfDay.format(formatter);
+            endDate = endOfDay.format(formatter);
         } else if(1 == type){
-            LocalDate yesterday = now.minusDays(1);
-            startDate = yesterday.format(formatter);
-            endDate = yesterday.format(formatter);
+            LocalDateTime yesterday = now.minusDays(1);
+            LocalDateTime startOfYesterday = yesterday.with(startOfDayTime);
+            LocalDateTime endOfYesterday = yesterday.with(endOfDayTime);
+            startDate = startOfYesterday.format(formatter);
+            endDate = endOfYesterday.format(formatter);
         } else if(2 == type) {
-            LocalDate startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
-            startDate = startOfWeek.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
+            LocalDateTime startOfStartOfWeek = startOfWeek.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfWeek.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(3 == type) {
-            LocalDate startOfMonth = now.withDayOfMonth(1);
-            startDate = startOfMonth.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfMonth = now.withDayOfMonth(1);
+            LocalDateTime startOfStartOfMonth = startOfMonth.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfMonth.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(4 == type) {
-            LocalDate firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
-            LocalDate lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
-            startDate = firstDayOfPreviousMonth.format(formatter);
-            endDate = lastDayOfPreviousMonth.format(formatter);
+            LocalDateTime firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
+            LocalDateTime lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
+
+            LocalDateTime startOfPrevMonthStart = firstDayOfPreviousMonth.with(startOfDayTime);
+            LocalDateTime endOfPrevMonthEnd = lastDayOfPreviousMonth.with(endOfDayTime);
+
+            startDate = startOfPrevMonthStart.format(formatter);
+            endDate = endOfPrevMonthEnd.format(formatter);
         }
 
         AnalysisPreviewQueryDTO param = new AnalysisPreviewQueryDTO();
@@ -174,27 +189,41 @@ public class StatisticsServiceImpl implements IStatisticsService {
         LocalDateTime now = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
+        LocalTime startOfDayTime = LocalTime.MIN;
+        LocalTime endOfDayTime = LocalTime.of(23, 59, 59);
 
         if(0 == type){
-            startDate = now.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfDay = now.with(startOfDayTime);
+            LocalDateTime endOfDay = now.with(endOfDayTime);
+            startDate = startOfDay.format(formatter);
+            endDate = endOfDay.format(formatter);
         } else if(1 == type){
             LocalDateTime yesterday = now.minusDays(1);
-            startDate = yesterday.format(formatter);
-            endDate = yesterday.format(formatter);
+            LocalDateTime startOfYesterday = yesterday.with(startOfDayTime);
+            LocalDateTime endOfYesterday = yesterday.with(endOfDayTime);
+            startDate = startOfYesterday.format(formatter);
+            endDate = endOfYesterday.format(formatter);
         } else if(2 == type) {
             LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
-            startDate = startOfWeek.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfWeek = startOfWeek.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfWeek.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(3 == type) {
             LocalDateTime startOfMonth = now.withDayOfMonth(1);
-            startDate = startOfMonth.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfMonth = startOfMonth.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfMonth.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(4 == type) {
             LocalDateTime firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
             LocalDateTime lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
-            startDate = firstDayOfPreviousMonth.format(formatter);
-            endDate = lastDayOfPreviousMonth.format(formatter);
+
+            LocalDateTime startOfPrevMonthStart = firstDayOfPreviousMonth.with(startOfDayTime);
+            LocalDateTime endOfPrevMonthEnd = lastDayOfPreviousMonth.with(endOfDayTime);
+
+            startDate = startOfPrevMonthStart.format(formatter);
+            endDate = endOfPrevMonthEnd.format(formatter);
         }
 
         AnalysisPreviewQueryDTO param = new AnalysisPreviewQueryDTO();
@@ -254,27 +283,41 @@ public class StatisticsServiceImpl implements IStatisticsService {
         LocalDateTime now = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
+        LocalTime startOfDayTime = LocalTime.MIN;
+        LocalTime endOfDayTime = LocalTime.of(23, 59, 59);
 
         if(0 == type){
-            startDate = now.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfDay = now.with(startOfDayTime);
+            LocalDateTime endOfDay = now.with(endOfDayTime);
+            startDate = startOfDay.format(formatter);
+            endDate = endOfDay.format(formatter);
         } else if(1 == type){
             LocalDateTime yesterday = now.minusDays(1);
-            startDate = yesterday.format(formatter);
-            endDate = yesterday.format(formatter);
+            LocalDateTime startOfYesterday = yesterday.with(startOfDayTime);
+            LocalDateTime endOfYesterday = yesterday.with(endOfDayTime);
+            startDate = startOfYesterday.format(formatter);
+            endDate = endOfYesterday.format(formatter);
         } else if(2 == type) {
             LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
-            startDate = startOfWeek.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfWeek = startOfWeek.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfWeek.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(3 == type) {
             LocalDateTime startOfMonth = now.withDayOfMonth(1);
-            startDate = startOfMonth.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfMonth = startOfMonth.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfMonth.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(4 == type) {
             LocalDateTime firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
             LocalDateTime lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
-            startDate = firstDayOfPreviousMonth.format(formatter);
-            endDate = lastDayOfPreviousMonth.format(formatter);
+
+            LocalDateTime startOfPrevMonthStart = firstDayOfPreviousMonth.with(startOfDayTime);
+            LocalDateTime endOfPrevMonthEnd = lastDayOfPreviousMonth.with(endOfDayTime);
+
+            startDate = startOfPrevMonthStart.format(formatter);
+            endDate = endOfPrevMonthEnd.format(formatter);
         }
 
         dto.setStartTime(startDate);
@@ -298,29 +341,42 @@ public class StatisticsServiceImpl implements IStatisticsService {
         LocalDateTime now = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
+        LocalTime startOfDayTime = LocalTime.MIN;
+        LocalTime endOfDayTime = LocalTime.of(23, 59, 59);
 
         if(0 == type){
-            startDate = now.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfDay = now.with(startOfDayTime);
+            LocalDateTime endOfDay = now.with(endOfDayTime);
+            startDate = startOfDay.format(formatter);
+            endDate = endOfDay.format(formatter);
         } else if(1 == type){
             LocalDateTime yesterday = now.minusDays(1);
-            startDate = yesterday.format(formatter);
-            endDate = yesterday.format(formatter);
+            LocalDateTime startOfYesterday = yesterday.with(startOfDayTime);
+            LocalDateTime endOfYesterday = yesterday.with(endOfDayTime);
+            startDate = startOfYesterday.format(formatter);
+            endDate = endOfYesterday.format(formatter);
         } else if(2 == type) {
             LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
-            startDate = startOfWeek.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfWeek = startOfWeek.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfWeek.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(3 == type) {
             LocalDateTime startOfMonth = now.withDayOfMonth(1);
-            startDate = startOfMonth.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfMonth = startOfMonth.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfMonth.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(4 == type) {
             LocalDateTime firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
             LocalDateTime lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
-            startDate = firstDayOfPreviousMonth.format(formatter);
-            endDate = lastDayOfPreviousMonth.format(formatter);
-        }
 
+            LocalDateTime startOfPrevMonthStart = firstDayOfPreviousMonth.with(startOfDayTime);
+            LocalDateTime endOfPrevMonthEnd = lastDayOfPreviousMonth.with(endOfDayTime);
+
+            startDate = startOfPrevMonthStart.format(formatter);
+            endDate = endOfPrevMonthEnd.format(formatter);
+        }
         dto.setStartTime(startDate);
         dto.setEndTime(endDate);
         dto.setUserType(userType);
@@ -508,27 +564,41 @@ public class StatisticsServiceImpl implements IStatisticsService {
         LocalDateTime now = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
+        LocalTime startOfDayTime = LocalTime.MIN;
+        LocalTime endOfDayTime = LocalTime.of(23, 59, 59);
 
         if(0 == type){
-            startDate = now.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfDay = now.with(startOfDayTime);
+            LocalDateTime endOfDay = now.with(endOfDayTime);
+            startDate = startOfDay.format(formatter);
+            endDate = endOfDay.format(formatter);
         } else if(1 == type){
             LocalDateTime yesterday = now.minusDays(1);
-            startDate = yesterday.format(formatter);
-            endDate = yesterday.format(formatter);
+            LocalDateTime startOfYesterday = yesterday.with(startOfDayTime);
+            LocalDateTime endOfYesterday = yesterday.with(endOfDayTime);
+            startDate = startOfYesterday.format(formatter);
+            endDate = endOfYesterday.format(formatter);
         } else if(2 == type) {
             LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
-            startDate = startOfWeek.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfWeek = startOfWeek.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfWeek.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(3 == type) {
             LocalDateTime startOfMonth = now.withDayOfMonth(1);
-            startDate = startOfMonth.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfMonth = startOfMonth.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfMonth.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(4 == type) {
             LocalDateTime firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
             LocalDateTime lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
-            startDate = firstDayOfPreviousMonth.format(formatter);
-            endDate = lastDayOfPreviousMonth.format(formatter);
+
+            LocalDateTime startOfPrevMonthStart = firstDayOfPreviousMonth.with(startOfDayTime);
+            LocalDateTime endOfPrevMonthEnd = lastDayOfPreviousMonth.with(endOfDayTime);
+
+            startDate = startOfPrevMonthStart.format(formatter);
+            endDate = endOfPrevMonthEnd.format(formatter);
         }
 
         dto.setStartTime(startDate);
@@ -552,27 +622,41 @@ public class StatisticsServiceImpl implements IStatisticsService {
         LocalDateTime now = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 
+        LocalTime startOfDayTime = LocalTime.MIN;
+        LocalTime endOfDayTime = LocalTime.of(23, 59, 59);
 
         if(0 == type){
-            startDate = now.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfDay = now.with(startOfDayTime);
+            LocalDateTime endOfDay = now.with(endOfDayTime);
+            startDate = startOfDay.format(formatter);
+            endDate = endOfDay.format(formatter);
         } else if(1 == type){
             LocalDateTime yesterday = now.minusDays(1);
-            startDate = yesterday.format(formatter);
-            endDate = yesterday.format(formatter);
+            LocalDateTime startOfYesterday = yesterday.with(startOfDayTime);
+            LocalDateTime endOfYesterday = yesterday.with(endOfDayTime);
+            startDate = startOfYesterday.format(formatter);
+            endDate = endOfYesterday.format(formatter);
         } else if(2 == type) {
             LocalDateTime startOfWeek = now.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
-            startDate = startOfWeek.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfWeek = startOfWeek.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfWeek.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(3 == type) {
             LocalDateTime startOfMonth = now.withDayOfMonth(1);
-            startDate = startOfMonth.format(formatter);
-            endDate = now.format(formatter);
+            LocalDateTime startOfStartOfMonth = startOfMonth.with(startOfDayTime);
+            LocalDateTime endOfToday = now.with(endOfDayTime);
+            startDate = startOfStartOfMonth.format(formatter);
+            endDate = endOfToday.format(formatter);
         } else if(4 == type) {
             LocalDateTime firstDayOfPreviousMonth = now.minusMonths(1).withDayOfMonth(1);
             LocalDateTime lastDayOfPreviousMonth = now.withDayOfMonth(1).minusDays(1);
-            startDate = firstDayOfPreviousMonth.format(formatter);
-            endDate = lastDayOfPreviousMonth.format(formatter);
+
+            LocalDateTime startOfPrevMonthStart = firstDayOfPreviousMonth.with(startOfDayTime);
+            LocalDateTime endOfPrevMonthEnd = lastDayOfPreviousMonth.with(endOfDayTime);
+
+            startDate = startOfPrevMonthStart.format(formatter);
+            endDate = endOfPrevMonthEnd.format(formatter);
         }
 
         dto.setStartTime(startDate);

+ 5 - 1
fs-service-system/src/main/resources/mapper/company/CompanyMoneyLogsMapper.xml

@@ -13,10 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="logsType"    column="logs_type"    />
         <result property="businessId"    column="business_id"    />
+        <result property="imgs"    column="imgs"    />
     </resultMap>
 
     <sql id="selectCompanyMoneyLogsVo">
-        select logs_id, company_id, money,balance, remark, create_time,logs_type,business_id from company_money_logs
+        select logs_id, company_id, money,balance, remark, create_time,logs_type,business_id, imgs from company_money_logs
     </sql>
 
     <select id="selectCompanyMoneyLogsList" parameterType="CompanyMoneyLogs" resultMap="CompanyMoneyLogsResult">
@@ -42,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="logsType != null">logs_type,</if>
             <if test="businessId != null">business_id,</if>
+            <if test="imgs != null">imgs,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyId != null">#{companyId},</if>
@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="logsType != null">#{logsType},</if>
             <if test="businessId != null">#{businessId},</if>
+            <if test="imgs != null">#{imgs},</if>
          </trim>
     </insert>
 
@@ -64,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="logsType != null">logs_type = #{logsType},</if>
             <if test="businessId != null">business_id = #{businessId},</if>
+            <if test="imgs != null">imgs = #{imgs},</if>
         </trim>
         where logs_id = #{logsId}
     </update>

+ 6 - 1
fs-service-system/src/main/resources/mapper/company/CompanyRechargeMapper.xml

@@ -20,10 +20,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="auditUserId"    column="audit_user_id"    />
         <result property="auditTime"    column="audit_time"    />
         <result property="remark"    column="remark"    />
+        <result property="imgs"    column="imgs"    />
     </resultMap>
 
     <sql id="selectCompanyRechargeVo">
-        select recharge_id, company_id, recharge_no, money, create_time, pay_time, status, pay_type, trade_no, balance, create_user_id, is_audit, audit_user_id, audit_time,remark from company_recharge
+        select recharge_id, company_id, recharge_no, imgs, money, create_time, pay_time, status, pay_type, trade_no, balance, create_user_id, is_audit, audit_user_id, audit_time,remark from company_recharge
     </sql>
 
     <select id="selectCompanyRechargeList" parameterType="CompanyRecharge" resultMap="CompanyRechargeResult">
@@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isAudit != null "> and is_audit = #{isAudit}</if>
             <if test="auditUserId != null "> and audit_user_id = #{auditUserId}</if>
             <if test="auditTime != null "> and audit_time = #{auditTime}</if>
+            <if test="imgs != null "> and imgs = #{imgs}</if>
         </where>
     </select>
     
@@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditUserId != null">audit_user_id,</if>
             <if test="auditTime != null">audit_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="imgs != null">imgs,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyId != null">#{companyId},</if>
@@ -82,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditUserId != null">#{auditUserId},</if>
             <if test="auditTime != null">#{auditTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="imgs != null">#{imgs},</if>
          </trim>
     </insert>
 
@@ -102,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auditUserId != null">audit_user_id = #{auditUserId},</if>
             <if test="auditTime != null">audit_time = #{auditTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="imgs != null">imgs = #{imgs},</if>
         </trim>
         where recharge_id = #{rechargeId}
     </update>

+ 1 - 1
fs-service-system/src/main/resources/mapper/company/CompanyRoleMapper.xml

@@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <sql id="selectRoleVo">
 	    select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
-            r.status, r.del_flag, r.create_time, r.remark
+            r.status, r.del_flag, r.create_time, r.remark, r.company_id
         from company_role r
 	        left join company_user_role ur on ur.role_id = r.role_id
 	        left join company_user u on u.user_id = ur.user_id

+ 1 - 1
fs-service-system/src/main/resources/mapper/sop/SopUserLogsInfoMapper.xml

@@ -349,7 +349,7 @@
     <select id="repeatProject" resultType="com.fs.sop.domain.SopUserLogsInfo">
         select a.*,b.project from sop_user_logs_info a
         inner join qw_sop b on a.sop_id = b.id
-        where b.project in <foreach collection="projects" open="(" separator="," close=")" item="item">#{item}</foreach>\
+        where b.project in <foreach collection="projects" open="(" separator="," close=")" item="item">#{item}</foreach>
         and a.external_contact_id = #{externalUserID}
     </select>