Explorar o código

定时任务处理维护资产(0)

%!s(int64=5) %!d(string=hai) anos
pai
achega
f534163ac6

+ 4 - 9
pcbms/src/main/java/com/hssx/pcbms/entity/Department.java

@@ -2,6 +2,8 @@ package com.hssx.pcbms.entity;
 
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
 import java.io.Serializable;
 
 /**
@@ -12,6 +14,7 @@ import java.io.Serializable;
  * @author 吴涛涛
  * @since 2019-11-06
  */
+@Data
 public class Department extends Model<Department> {
 
     private static final long serialVersionUID=1L;
@@ -20,7 +23,7 @@ public class Department extends Model<Department> {
      * 部门guid
      */
     @TableField("department_guid")
-    private String departmentGuid;
+    private String id;
 
     /**
      * 父部门guid
@@ -89,13 +92,6 @@ public class Department extends Model<Department> {
     private String departmentKeycode;
 
 
-    public String getDepartmentGuid() {
-        return departmentGuid;
-    }
-
-    public void setDepartmentGuid(String departmentGuid) {
-        this.departmentGuid = departmentGuid;
-    }
 
     public String getSuperiorGuid() {
         return superiorGuid;
@@ -193,7 +189,6 @@ public class Department extends Model<Department> {
     @Override
     public String toString() {
         return "Department{" +
-        "departmentGuid=" + departmentGuid +
         ", superiorGuid=" + superiorGuid +
         ", departmentName=" + departmentName +
         ", departmentFullname=" + departmentFullname +

+ 6 - 6
pcbms/src/main/java/com/hssx/pcbms/service/impl/ScoreServiceImpl.java

@@ -47,7 +47,7 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
     @Override
     public HttpRespMsg add(Score score) throws ParseException {
         HttpRespMsg msg = new HttpRespMsg();
-//        SimpleDateFormat sdfymd = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdfymd = new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat sdfym = new SimpleDateFormat("yyyy-MM");
         Parameter parameter = parameterMapper.selectOne(new QueryWrapper<Parameter>().eq("param_key", Constant.SCORING_DEADLINE_CODE));
         if (parameter != null) {
@@ -57,20 +57,20 @@ public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements
                 msg.setError("当前打分人身份异常。");
                 return msg;
             }
-            Score oldScore = scoreMapper.selectOne(new QueryWrapper<Score>().eq("scoring_year_month", score.getScoringYearMonth()));
+            Score oldScore = scoreMapper.selectOne(new QueryWrapper<Score>().eq("scoring_year_month", score.getScoringYearMonth()).eq("uid",score.getUid()));
             if (score.getScoreId() != null) {
                 //修改打分
                 scoreMapper.updateById(score);
             } else {
                 Date now = new Date();
                 now.setDate(Integer.parseInt(parameter.getParamValue()));
-                String thisMonth5 = sdfym.format(now);
+                String thisMonth5 = sdfymd.format(now);
                 now.setMonth(now.getMonth() - 1);
-                String lastMonth5 = sdfym.format(now);
+                String lastMonth5 = sdfymd.format(now);
                 now.setMonth(now.getMonth() + 2);
-                String nextMonth5 = sdfym.format(now);
+                String nextMonth5 = sdfymd.format(now);
                 Date nowDate = new Date();
-                String currentDateStr = sdfym.format(nowDate);
+                String currentDateStr = sdfymd.format(nowDate);
                 //打分日期
                 Date yearMonth = sdfym.parse(score.getScoringYearMonth());
                 if (currentDateStr.compareTo(lastMonth5) >= 0 && currentDateStr.compareTo(thisMonth5) <= 0) {