|
@@ -8,6 +8,7 @@ import com.aspose.cells.PageSetup;
|
|
import com.aspose.cells.SaveFormat;
|
|
import com.aspose.cells.SaveFormat;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -86,6 +87,7 @@ import java.io.*;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
import java.lang.reflect.Method;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
+import java.math.RoundingMode;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
@@ -1378,6 +1380,7 @@ public class TaskController extends BladeController {
|
|
if (reportAllMoney == null || reportAllMoney.compareTo(BigDecimal.ZERO) == 0){
|
|
if (reportAllMoney == null || reportAllMoney.compareTo(BigDecimal.ZERO) == 0){
|
|
throw new ServiceException("上报金额不能为0");
|
|
throw new ServiceException("上报金额不能为0");
|
|
}
|
|
}
|
|
|
|
+ reportAllMoney =reportAllMoney.setScale(0,RoundingMode.HALF_UP);
|
|
vo.setReportAllMoney(reportAllMoney);
|
|
vo.setReportAllMoney(reportAllMoney);
|
|
if (task.getIsBuildAudit() == 1) {
|
|
if (task.getIsBuildAudit() == 1) {
|
|
PeriodVO periodVO = null;
|
|
PeriodVO periodVO = null;
|
|
@@ -1408,8 +1411,13 @@ public class TaskController extends BladeController {
|
|
}
|
|
}
|
|
WbsTreePrivate aPrivate = r.getData();
|
|
WbsTreePrivate aPrivate = r.getData();
|
|
//获取所有的key
|
|
//获取所有的key
|
|
- Map<String, String> map = FileUtils.getHtmlAllKey(aPrivate.getHtmlUrl());
|
|
|
|
-// Map<String, String> map = FileUtils.getHtmlAllKey("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1802649593746292736.html");
|
|
|
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
|
+ String os = System.getProperty("os.name").toLowerCase();
|
|
|
|
+ if (os.contains("win")) {
|
|
|
|
+ map = FileUtils.getHtmlAllKey("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1808346073870106624.html");
|
|
|
|
+ } else {
|
|
|
|
+ map = FileUtils.getHtmlAllKey(aPrivate.getHtmlUrl());
|
|
|
|
+ }
|
|
if (map.size() == 0) {
|
|
if (map.size() == 0) {
|
|
throw new ServiceException("未获取到html中的keyName");
|
|
throw new ServiceException("未获取到html中的keyName");
|
|
}
|
|
}
|
|
@@ -1433,6 +1441,7 @@ public class TaskController extends BladeController {
|
|
}
|
|
}
|
|
|
|
|
|
if (beforeMoney != null) {
|
|
if (beforeMoney != null) {
|
|
|
|
+ beforeMoney = beforeMoney.setScale(0,RoundingMode.HALF_UP);
|
|
tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)"), beforeMoney);
|
|
tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)"), beforeMoney);
|
|
}
|
|
}
|
|
tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"), beforeMoney == null ? reportAllMoney : beforeMoney.add(reportAllMoney));
|
|
tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"), beforeMoney == null ? reportAllMoney : beforeMoney.add(reportAllMoney));
|
|
@@ -2580,6 +2589,9 @@ public class TaskController extends BladeController {
|
|
reportId = inData2.getId() + "";
|
|
reportId = inData2.getId() + "";
|
|
} else {
|
|
} else {
|
|
reportId = inData.getId() + "";
|
|
reportId = inData.getId() + "";
|
|
|
|
+ interimPayCertificateService.update(new LambdaUpdateWrapper<InterimPayCertificate>()
|
|
|
|
+ .eq(InterimPayCertificate::getId,reportId)
|
|
|
|
+ .set(InterimPayCertificate::getPayMoney,currentMeterMoney));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/**计量公式执行 0中间,1材料,2开工*/
|
|
/**计量公式执行 0中间,1材料,2开工*/
|
|
@@ -2639,8 +2651,13 @@ public class TaskController extends BladeController {
|
|
}
|
|
}
|
|
WbsTreePrivate aPrivate = (WbsTreePrivate) r.getData();
|
|
WbsTreePrivate aPrivate = (WbsTreePrivate) r.getData();
|
|
//获取所有的key
|
|
//获取所有的key
|
|
- Map<String, String> map = FileUtils.getHtmlAllKey(aPrivate.getHtmlUrl());
|
|
|
|
-// Map<String, String> map = FileUtils.getHtmlAllKey("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1802649593746292736.html");
|
|
|
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
|
+ String os = System.getProperty("os.name").toLowerCase();
|
|
|
|
+ if (os.contains("win")) {
|
|
|
|
+ map = FileUtils.getHtmlAllKey("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1808346073870106624.html");
|
|
|
|
+ } else {
|
|
|
|
+ map = FileUtils.getHtmlAllKey(aPrivate.getHtmlUrl());
|
|
|
|
+ }
|
|
if (map.size() == 0){
|
|
if (map.size() == 0){
|
|
throw new ServiceException("未获取到html中的keyName");
|
|
throw new ServiceException("未获取到html中的keyName");
|
|
}
|
|
}
|
|
@@ -2673,15 +2690,21 @@ public class TaskController extends BladeController {
|
|
Task updateTask = new Task();
|
|
Task updateTask = new Task();
|
|
updateTask.setId(task.getId());
|
|
updateTask.setId(task.getId());
|
|
Map<String, Object> tableData = dto.getTableData();
|
|
Map<String, Object> tableData = dto.getTableData();
|
|
|
|
+ Object ob = tableData.get(map.get("要求付款额度"));
|
|
|
|
+ if (ob != null){
|
|
|
|
+ BigDecimal decimal = new BigDecimal(ob.toString()).setScale(0,RoundingMode.HALF_UP);
|
|
|
|
+ tableData.put(map.get("要求付款额度"), decimal);
|
|
|
|
+ }
|
|
Object object = tableData.get(map.get("造价机构现场咨询意见_本期审核进度款(元)"));
|
|
Object object = tableData.get(map.get("造价机构现场咨询意见_本期审核进度款(元)"));
|
|
if (object != null) {
|
|
if (object != null) {
|
|
try {
|
|
try {
|
|
- BigDecimal decimal = new BigDecimal(object.toString());
|
|
|
|
|
|
+ BigDecimal decimal = new BigDecimal(object.toString()).setScale(0,RoundingMode.HALF_UP);
|
|
|
|
+ tableData.put(map.get("造价机构现场咨询意见_本期审核进度款(元)"), decimal);
|
|
updateTask.setTaskCommonMoney(decimal);
|
|
updateTask.setTaskCommonMoney(decimal);
|
|
Object object2 = tableData.get(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)"));
|
|
Object object2 = tableData.get(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)"));
|
|
if (object2 != null) {
|
|
if (object2 != null) {
|
|
- BigDecimal decimal2 = new BigDecimal(object2.toString());
|
|
|
|
- tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"), decimal.add(decimal2));
|
|
|
|
|
|
+ BigDecimal decimal2 = new BigDecimal(object2.toString()).setScale(0,RoundingMode.HALF_UP);
|
|
|
|
+ tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"), decimal.add(decimal2).setScale(0,RoundingMode.HALF_UP));
|
|
} else {
|
|
} else {
|
|
tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"), decimal);
|
|
tableData.put(map.get("造价机构现场咨询意见_截止上期已累计审批进度款(元)_截止本期已累计审核进度款(元)"), decimal);
|
|
}
|
|
}
|
|
@@ -2762,7 +2785,7 @@ public class TaskController extends BladeController {
|
|
Object object2 = tableData.get(key);
|
|
Object object2 = tableData.get(key);
|
|
if (object2 != null) {
|
|
if (object2 != null) {
|
|
try {
|
|
try {
|
|
- BigDecimal decimal = new BigDecimal(object2.toString());
|
|
|
|
|
|
+ BigDecimal decimal = new BigDecimal(object2.toString()).setScale(0, RoundingMode.HALF_UP);
|
|
tableData.put(key,decimal.toString()+"元");
|
|
tableData.put(key,decimal.toString()+"元");
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
throw new ServiceException("金额格式不对");
|
|
throw new ServiceException("金额格式不对");
|
|
@@ -3172,6 +3195,13 @@ public class TaskController extends BladeController {
|
|
@ApiOperationSupport(order = 22)
|
|
@ApiOperationSupport(order = 22)
|
|
@ApiOperation(value = "计量生成Pdf", notes = "计量生成Pdf")
|
|
@ApiOperation(value = "计量生成Pdf", notes = "计量生成Pdf")
|
|
public R meterPdfInfo(@RequestParam String reportId, @RequestParam Integer type) {
|
|
public R meterPdfInfo(@RequestParam String reportId, @RequestParam Integer type) {
|
|
|
|
+ /*加锁*/
|
|
|
|
+ String redisValue = bladeRedis.get("blade:meter::meterPdfInfo:reportId-" + reportId);
|
|
|
|
+ if (StringUtils.isNotBlank(redisValue) && redisValue.equals("1")) {
|
|
|
|
+ throw new ServiceException("重新计算中,请等待");
|
|
|
|
+ }
|
|
|
|
+ bladeRedis.set("blade:meter::meterPdfInfo:reportId-" + reportId, "1");
|
|
|
|
+ bladeRedis.expire("blade:meter::meterPdfInfo:reportId-" + reportId, 5);
|
|
return calculate(reportId, type);
|
|
return calculate(reportId, type);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3739,7 +3769,7 @@ public class TaskController extends BladeController {
|
|
String fileUrl = null;
|
|
String fileUrl = null;
|
|
String os = System.getProperty("os.name").toLowerCase();
|
|
String os = System.getProperty("os.name").toLowerCase();
|
|
if (os.contains("win")) {
|
|
if (os.contains("win")) {
|
|
- fileUrl = "C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1802649593746292736.html";
|
|
|
|
|
|
+ fileUrl = "C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1808346073870106624.html";
|
|
} else {
|
|
} else {
|
|
fileUrl = aPrivate.getHtmlUrl();
|
|
fileUrl = aPrivate.getHtmlUrl();
|
|
}
|
|
}
|
|
@@ -3796,8 +3826,13 @@ public class TaskController extends BladeController {
|
|
|
|
|
|
//数据不为空,构造数据
|
|
//数据不为空,构造数据
|
|
String fileUrl = aPrivate.getHtmlUrl();
|
|
String fileUrl = aPrivate.getHtmlUrl();
|
|
- File file1 = ResourceUtil.getFile(fileUrl);
|
|
|
|
-// File file1 = ResourceUtil.getFile("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1802649593746292736.html");
|
|
|
|
|
|
+ File file1 = null;
|
|
|
|
+ String os = System.getProperty("os.name").toLowerCase();
|
|
|
|
+ if (os.contains("win")) {
|
|
|
|
+ file1 = ResourceUtil.getFile("C:\\Users\\泓创研发01\\Desktop\\fsdownload\\1808346073870106624.html");
|
|
|
|
+ } else {
|
|
|
|
+ file1 = ResourceUtil.getFile(fileUrl);
|
|
|
|
+ }
|
|
InputStream fileInputStream;
|
|
InputStream fileInputStream;
|
|
if (file1.exists()) {
|
|
if (file1.exists()) {
|
|
fileInputStream = new FileInputStream(file1);
|
|
fileInputStream = new FileInputStream(file1);
|
|
@@ -3813,7 +3848,7 @@ public class TaskController extends BladeController {
|
|
org.jsoup.nodes.Document doc = Jsoup.parse(htmlString);
|
|
org.jsoup.nodes.Document doc = Jsoup.parse(htmlString);
|
|
Element table = doc.select("table").first();
|
|
Element table = doc.select("table").first();
|
|
Elements trs = table.select("tr");
|
|
Elements trs = table.select("tr");
|
|
-
|
|
|
|
|
|
+ System.out.println("----------------------组装电签---------------------------");
|
|
//实际电签人
|
|
//实际电签人
|
|
Set<User> sigUser = new HashSet<>();
|
|
Set<User> sigUser = new HashSet<>();
|
|
List<TextdictInfo> infoList = jdbcTemplate.query("select * from m_textdict_info where type in (2,6) and tab_id = " + aPrivate.getPKeyId(), new BeanPropertyRowMapper<>(TextdictInfo.class));
|
|
List<TextdictInfo> infoList = jdbcTemplate.query("select * from m_textdict_info where type in (2,6) and tab_id = " + aPrivate.getPKeyId(), new BeanPropertyRowMapper<>(TextdictInfo.class));
|
|
@@ -3867,7 +3902,8 @@ public class TaskController extends BladeController {
|
|
htmlDeptIdMap.put(textdictInfo.getId(),textdictInfo.getSigRoleName()+"123");
|
|
htmlDeptIdMap.put(textdictInfo.getId(),textdictInfo.getSigRoleName()+"123");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //过滤去除为null的key
|
|
|
|
+ DataInfo.remove(null);
|
|
if (ObjectUtil.isNotEmpty(DataInfo)) {
|
|
if (ObjectUtil.isNotEmpty(DataInfo)) {
|
|
for (String val : Objects.requireNonNull(DataInfo).keySet()) {
|
|
for (String val : Objects.requireNonNull(DataInfo).keySet()) {
|
|
if (val.contains("__")) {
|
|
if (val.contains("__")) {
|
|
@@ -4004,6 +4040,8 @@ public class TaskController extends BladeController {
|
|
newStyle.setFont(redFont);
|
|
newStyle.setFont(redFont);
|
|
cell.setCellStyle(newStyle);
|
|
cell.setCellStyle(newStyle);
|
|
String sig = htmlDeptIdMap.get(e.getId());
|
|
String sig = htmlDeptIdMap.get(e.getId());
|
|
|
|
+// String other = StringUtils.isBlank(cell.getStringCellValue())?"":cell.getStringCellValue();
|
|
|
|
+// cell.setCellValue(sig+","+other);
|
|
cell.setCellValue(sig);
|
|
cell.setCellValue(sig);
|
|
} else {
|
|
} else {
|
|
ObjectUtils.isNotEmpty(cell);
|
|
ObjectUtils.isNotEmpty(cell);
|
|
@@ -4021,7 +4059,7 @@ public class TaskController extends BladeController {
|
|
|
|
|
|
FileUtils.setExcelScaleToPdf(excelPath, pdfPath);
|
|
FileUtils.setExcelScaleToPdf(excelPath, pdfPath);
|
|
BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
|
|
BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
|
|
-
|
|
|
|
|
|
+ System.out.println("----------------------处理证书---------------------------");
|
|
if (bladeFile != null) {
|
|
if (bladeFile != null) {
|
|
//获取所有专家个人证书
|
|
//获取所有专家个人证书
|
|
List<SignPfxFile> list = jdbcTemplate.query(" select * from m_sign_pfx_file where is_deleted = 0 and certificate_user_id in ("+sigUser.stream().map(User::getId).distinct().map(Objects::toString).collect(Collectors.joining(",")) +")", new BeanPropertyRowMapper<>(SignPfxFile.class));
|
|
List<SignPfxFile> list = jdbcTemplate.query(" select * from m_sign_pfx_file where is_deleted = 0 and certificate_user_id in ("+sigUser.stream().map(User::getId).distinct().map(Objects::toString).collect(Collectors.joining(",")) +")", new BeanPropertyRowMapper<>(SignPfxFile.class));
|