|
@@ -1743,7 +1743,7 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId"),
|
|
|
@ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd")
|
|
|
})
|
|
|
- public R<String> getTheLogPdInfo(String theLogId, String nodePrimaryKeyId, String recordTime) throws Exception{
|
|
|
+ public R<String> getTheLogPdInfo(String theLogId, String nodePrimaryKeyId, String recordTime, String contractId) throws Exception{
|
|
|
//获取配置的路径
|
|
|
String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
|
|
@@ -1755,7 +1755,7 @@ public class ExcelTabController extends BladeController {
|
|
|
if(StringUtils.isEmpty(recordTime)){
|
|
|
recordTime = DateUtil.format(DateUtil.now(), "yyyy-MM-dd");
|
|
|
}
|
|
|
- theLogJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, recordTime);
|
|
|
+ theLogJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, recordTime, contractId);
|
|
|
}
|
|
|
|
|
|
if(theLogJson != null){
|
|
@@ -1779,7 +1779,7 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
|
|
|
//获取数据
|
|
|
- List<Map<String, Object>> businessDataMapList = (List<Map<String, Object>>)this.getTheLogBusinessData(theLogId, nodePrimaryKeyId, recordTime).getData();
|
|
|
+ List<Map<String, Object>> businessDataMapList = this.getTheLogBusinessData(theLogId, nodePrimaryKeyId, recordTime, contractId).getData();
|
|
|
//PDF路径
|
|
|
List<String> pdfUrls = new ArrayList<>();
|
|
|
|
|
@@ -1885,6 +1885,7 @@ public class ExcelTabController extends BladeController {
|
|
|
int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
|
|
|
|
|
|
final CellRange cellRange = sheet.getCellRange(y1, x1);
|
|
|
+
|
|
|
cellRange.setText(e.getId() + "");
|
|
|
cellRange.getCellStyle().getFont().setColor(Color.white);
|
|
|
|
|
@@ -1932,18 +1933,25 @@ public class ExcelTabController extends BladeController {
|
|
|
return R.data(null);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取当前用户当前日期的填报记录
|
|
|
+ */
|
|
|
@GetMapping("/get-the-log-business-data")
|
|
|
@ApiOperationSupport(order = 26)
|
|
|
@ApiOperation(value = "获取当前用户当前日期的填报记录")
|
|
|
- @ApiImplicitParam(name = "theLogId", value = "日志ID", required = true)
|
|
|
- public R getTheLogBusinessData(String theLogId, String nodePrimaryKeyId, String recordTime) {
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "theLogId", value = "日志记录的id,可能为空"),
|
|
|
+ @ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId"),
|
|
|
+ @ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd")
|
|
|
+ })
|
|
|
+ public R<List<Map<String, Object>>> getTheLogBusinessData(String theLogId, String nodePrimaryKeyId, String recordTime, String contractId) {
|
|
|
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
|
|
//获取对应的记录
|
|
|
JSONObject theLogJson;
|
|
|
if(StringUtils.isNotEmpty(theLogId)){
|
|
|
theLogJson = this.contractLogClient.queryContractLogById(theLogId);
|
|
|
} else {
|
|
|
- theLogJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, recordTime);
|
|
|
+ theLogJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, recordTime, contractId);
|
|
|
}
|
|
|
if(theLogJson != null){
|
|
|
//查询对应的html
|
|
@@ -2035,10 +2043,10 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParam(name = "currentTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd"),
|
|
|
@ApiImplicitParam(name = "targetTime", value = "需要复制的目标日期")
|
|
|
})
|
|
|
- public R<List<Map<String, Object>>> copyTheLogBusinessData(@RequestParam String nodePrimaryKeyId, @RequestParam String currentTime, @RequestParam String targetTime){
|
|
|
+ public R<List<Map<String, Object>>> copyTheLogBusinessData(@RequestParam String nodePrimaryKeyId, @RequestParam String currentTime, @RequestParam String targetTime, @RequestParam String contractId){
|
|
|
if(StringUtils.isNotEmpty(nodePrimaryKeyId) && StringUtils.isNotEmpty(currentTime) && StringUtils.isNotEmpty(targetTime)){
|
|
|
//获取目标的数据
|
|
|
- JSONObject targetJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, targetTime);
|
|
|
+ JSONObject targetJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, targetTime, contractId);
|
|
|
if(targetJson == null){
|
|
|
return R.fail("目标日期下未找到当前用户填报的数据,请重新选择");
|
|
|
}
|
|
@@ -2053,7 +2061,7 @@ public class ExcelTabController extends BladeController {
|
|
|
List<Map<String, Object>> targetDatas = this.jdbcTemplate.queryForList(queryTargetDataSql);
|
|
|
|
|
|
//检查当前日期下是否存在数据
|
|
|
- JSONObject currentJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, currentTime);
|
|
|
+ JSONObject currentJson = this.contractLogClient.queryContractLogByPrimaryKeyIdAndRecordTime(nodePrimaryKeyId, currentTime, contractId);
|
|
|
String businessId = SnowFlakeUtil.getId().toString();
|
|
|
boolean isNew = true;
|
|
|
if(currentJson != null){
|
|
@@ -2085,7 +2093,11 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
//设置参数
|
|
|
keySql.append(",").append(key);
|
|
|
- valueSql.append(",").append("'").append(value).append("'");
|
|
|
+ if(value != null && StringUtils.isNotEmpty(String.valueOf(value))){
|
|
|
+ valueSql.append(",").append("'").append(value).append("'");
|
|
|
+ } else {
|
|
|
+ valueSql.append(",").append(value);
|
|
|
+ }
|
|
|
}
|
|
|
//组装SQL
|
|
|
insertSql.append(" (").append(keySql.toString().substring(1)).append(") ");
|
|
@@ -2113,7 +2125,7 @@ public class ExcelTabController extends BladeController {
|
|
|
));
|
|
|
|
|
|
//返回当前的新数据
|
|
|
- return this.getTheLogBusinessData(!isNew ? currentJson.getString("id") : null, nodePrimaryKeyId, currentTime);
|
|
|
+ return this.getTheLogBusinessData(!isNew ? currentJson.getString("id") : null, nodePrimaryKeyId, currentTime, contractId);
|
|
|
}
|
|
|
|
|
|
return null;
|