|
@@ -9,6 +9,7 @@ import java.util.List;
|
|
|
|
|
|
import com.jeeplus.modules.sg.information.entity.Information;
|
|
|
import com.jeeplus.modules.sg.information.entity.append;
|
|
|
+import com.jeeplus.modules.sg.information.entity.constant;
|
|
|
import com.jeeplus.modules.sg.information.mapper.InformationMapper;
|
|
|
import com.jeeplus.modules.sg.material.entity.Material;
|
|
|
import io.swagger.models.auth.In;
|
|
@@ -49,13 +50,14 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
|
|
|
Page<Information> page1 = super.findPage(page, entity);
|
|
|
List<Information> list = page1.getList();
|
|
|
+ String find = informationMapper.findOverTime("overTime");
|
|
|
+ int overTime = Integer.parseInt(find);
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
long between_days = 0;
|
|
|
for (Information in : list) {
|
|
|
//判断审定日期是否为空
|
|
|
// if (in.getApprovalDate() != null) {
|
|
|
//格式化审定日期
|
|
|
-
|
|
|
if ("否".equals(in.getFirstFinish()) || "否".equals(in.getSecondFinish())) {
|
|
|
in.setComplete("否");
|
|
|
if (in.getApprovalDate() != null) {
|
|
@@ -77,7 +79,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
long secondDate = cal.getTimeInMillis();
|
|
|
between_days = (secondDate - appDay) / (1000 * 3600 * 24);
|
|
|
in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
- if (between_days > 14) {
|
|
|
+ if (between_days > overTime) {
|
|
|
in.setOverdue("是");
|
|
|
} else {
|
|
|
in.setOverdue("否");
|
|
@@ -87,7 +89,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
long firstDate = cal.getTimeInMillis();
|
|
|
between_days = (firstDate - appDay) / (1000 * 3600 * 24);
|
|
|
in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
- if (between_days > 14) {
|
|
|
+ if (between_days > overTime) {
|
|
|
in.setOverdue("是");
|
|
|
} else {
|
|
|
in.setOverdue("否");
|
|
@@ -163,6 +165,8 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
|
|
|
public List<Information> exportInfor(List<Information> list) {
|
|
|
List<Information> informationList = informationMapper.exportInfor(list);
|
|
|
+ String find = informationMapper.findOverTime("overTime");
|
|
|
+ int overTime = Integer.parseInt(find);
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
long between_days = 0;
|
|
|
for (Information in : informationList) {
|
|
@@ -187,7 +191,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
long secondDate = cal.getTimeInMillis();
|
|
|
between_days = (secondDate - appDay) / (1000 * 3600 * 24);
|
|
|
in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
- if (between_days > 14) {
|
|
|
+ if (between_days > overTime) {
|
|
|
in.setOverdue("是");
|
|
|
} else {
|
|
|
in.setOverdue("否");
|
|
@@ -197,7 +201,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
long firstDate = cal.getTimeInMillis();
|
|
|
between_days = (firstDate - appDay) / (1000 * 3600 * 24);
|
|
|
in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
- if (between_days > 14) {
|
|
|
+ if (between_days > overTime) {
|
|
|
in.setOverdue("是");
|
|
|
} else {
|
|
|
in.setOverdue("否");
|
|
@@ -212,6 +216,8 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
|
|
|
public List<Information> export(List<Information> list) {
|
|
|
List<Information> export = informationMapper.export(list);
|
|
|
+ String find = informationMapper.findOverTime("overTime");
|
|
|
+ int overTime = Integer.parseInt(find);
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
long between_days = 0;
|
|
|
for (Information in : export) {
|
|
@@ -236,7 +242,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
long secondDate = cal.getTimeInMillis();
|
|
|
between_days = (secondDate - appDay) / (1000 * 3600 * 24);
|
|
|
in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
- if (between_days > 14) {
|
|
|
+ if (between_days > overTime) {
|
|
|
in.setOverdue("是");
|
|
|
} else {
|
|
|
in.setOverdue("否");
|
|
@@ -246,7 +252,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
long firstDate = cal.getTimeInMillis();
|
|
|
between_days = (firstDate - appDay) / (1000 * 3600 * 24);
|
|
|
in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
- if (between_days > 14) {
|
|
|
+ if (between_days > overTime) {
|
|
|
in.setOverdue("是");
|
|
|
} else {
|
|
|
in.setOverdue("否");
|
|
@@ -263,4 +269,13 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
public List<Information> findIdByList(List<Information> list) {
|
|
|
return informationMapper.findIdByList(list);
|
|
|
}
|
|
|
+
|
|
|
+ public String findOverTime(String overType){
|
|
|
+ return informationMapper.findOverTime(overType);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Transactional(readOnly = false)
|
|
|
+ public int updateConstant(constant constant) {
|
|
|
+ return informationMapper.updateConstant(constant);
|
|
|
+ }
|
|
|
}
|