|
@@ -10,6 +10,8 @@ import com.example.nngkxxdp.dao.ColumnDao;
|
|
|
import com.example.nngkxxdp.dao.HlwInterfaceDao;
|
|
|
import com.example.nngkxxdp.dao.TjDao;
|
|
|
import com.example.nngkxxdp.enums.UtilEnum;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -21,6 +23,8 @@ import java.util.*;
|
|
|
@Component
|
|
|
public class WzkpRecordUtil {
|
|
|
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(WzkpRecordUtil.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private TjDao tjDao;
|
|
|
|
|
@@ -38,7 +42,7 @@ public class WzkpRecordUtil {
|
|
|
public void generateRecord(String dateString) {
|
|
|
try {
|
|
|
//基础处理
|
|
|
- if (dateString.isEmpty()) {
|
|
|
+ if (Blank.isEmpty(dateString)) {
|
|
|
dateString = DateUtil.format(new Date(), "yyyy-MM-dd");
|
|
|
}
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
@@ -78,6 +82,7 @@ public class WzkpRecordUtil {
|
|
|
cl4.setTime(date);
|
|
|
cl4.add(Calendar.MONTH, -1);
|
|
|
String thisMonth = DateUtil.format(cl4.getTime(), "yyyy-MM");
|
|
|
+ logger.info("开始生成" + thisMonth + "网站考评的数据");
|
|
|
// 查询是否已初始化
|
|
|
Integer count = tjDao.getCountWebsiteRating(null, thisMonth);
|
|
|
// 部门基础分值配置
|
|
@@ -85,6 +90,7 @@ public class WzkpRecordUtil {
|
|
|
if (count == 0) {
|
|
|
// 初始化当月分值
|
|
|
tjDao.saveDeptRecord(deptList, thisMonth);
|
|
|
+ logger.info("生成部门基础分值成功");
|
|
|
}
|
|
|
//----------------------------------------
|
|
|
|
|
@@ -297,6 +303,8 @@ public class WzkpRecordUtil {
|
|
|
}
|
|
|
}
|
|
|
tjDao.saveNewRecord(tRecordList);
|
|
|
+ logger.info("生成加扣分详情成功!");
|
|
|
+ logger.info(thisMonth+"网站考评分数生成成功!");
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|