|
@@ -2433,7 +2433,8 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "theLogId", value = "日志记录的ids,可能为空(多张表)"),
|
|
|
@ApiImplicitParam(name = "nodePrimaryKeyId", value = "当前操作的日志类型ID,即左侧列表的节点primaryKeyId"),
|
|
|
- @ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd")
|
|
|
+ @ApiImplicitParam(name = "recordTime", value = "当前选择的填写日期,即右侧日期控件所选日期,格式为 yyyy-MM-dd"),
|
|
|
+ @ApiImplicitParam(name = "contractId", value = "合同段id")
|
|
|
})
|
|
|
public R<List<Map<String, Object>>> getTheLogBusinessData(String theLogId, String nodePrimaryKeyId, String recordTime, String contractId) {
|
|
|
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
|
@@ -2616,9 +2617,9 @@ public class ExcelTabController extends BladeController {
|
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("type", 4);
|
|
|
queryWrapper.eq("tab_id", node.getPKeyId());
|
|
|
- final List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
- if (!textdictInfos.isEmpty()) {
|
|
|
- for (TextdictInfo textdictInfo : textdictInfos) {
|
|
|
+ final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
+ if (!textDictInfos.isEmpty()) {
|
|
|
+ for (TextdictInfo textdictInfo : textDictInfos) {
|
|
|
if (reData.containsKey(textdictInfo.getColKey())) {
|
|
|
String keyVal = reData.get(textdictInfo.getColKey()) + "";
|
|
|
} else {
|
|
@@ -2626,33 +2627,34 @@ public class ExcelTabController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // 移除Id 和 p_key_id
|
|
|
+ //移除id和p_key_id
|
|
|
reData.remove("p_key_id");
|
|
|
reData.remove("classify");
|
|
|
reData.remove("contractId");
|
|
|
reData.remove("pkeyId");
|
|
|
reData.remove("projectId");
|
|
|
- resultMapList.add(reData);
|
|
|
+ if (reData.size() > 0) {
|
|
|
+ resultMapList.add(reData);
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
- resultMapList.add(reData);
|
|
|
Map<String, Object> reData2 = new HashMap<>();
|
|
|
- // 获取默认值
|
|
|
+ //获取默认值
|
|
|
QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("type", 4);
|
|
|
queryWrapper.eq("tab_id", tableNode2.getPKeyId());
|
|
|
- final List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
- if (!textdictInfos.isEmpty()) {
|
|
|
- for (TextdictInfo textdictInfo : textdictInfos) {
|
|
|
+ final List<TextdictInfo> textDictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
+ if (!textDictInfos.isEmpty()) {
|
|
|
+ for (TextdictInfo textdictInfo : textDictInfos) {
|
|
|
reData2.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
|
|
|
}
|
|
|
- resultMapList.add(reData2);
|
|
|
+ if (reData2.size() > 0) {
|
|
|
+ resultMapList.add(reData2);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
return R.data(resultMapList);
|
|
|
}
|
|
|
|
|
@@ -3663,7 +3665,7 @@ public class ExcelTabController extends BladeController {
|
|
|
* 编辑元素,提示未匹配元素
|
|
|
*/
|
|
|
@GetMapping("/getUnMatchField")
|
|
|
- @ApiOperationSupport(order = 20)
|
|
|
+ @ApiOperationSupport(order = 40)
|
|
|
@ApiOperation(value = "编辑元素,提示未匹配元素", notes = "返回未匹配元素数组")
|
|
|
@ApiImplicitParams(value = {
|
|
|
@ApiImplicitParam(name = "pkeyId", value = "WBS私有库的pkeyId", required = true),
|
|
@@ -3673,4 +3675,29 @@ public class ExcelTabController extends BladeController {
|
|
|
return R.data(excelTabService.getUnMatchField(pkeyId, tabId));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/removeLogTab")
|
|
|
+ @ApiOperationSupport(order = 41)
|
|
|
+ @ApiOperation(value = "删除施工日志对应的表数据记录信息等", notes = "传入get-the-log-business-data接口返回的内部id")
|
|
|
+ public R<Object> removeLogTab(@RequestParam String id) {
|
|
|
+ if (StringUtils.isNotEmpty(id)) {
|
|
|
+ ContractLog obj = jdbcTemplate.queryForObject("select * from u_contract_log where data_id = " + id, new BeanPropertyRowMapper<>(ContractLog.class));
|
|
|
+ if (obj != null) {
|
|
|
+ //删除施工日志记录信息
|
|
|
+ jdbcTemplate.execute("delete from u_contract_log where data_id = " + id);
|
|
|
+ //删除关联的工序wbs信息
|
|
|
+ jdbcTemplate.execute("delete from u_contract_log_wbs where business_id = " + id + " and contract_log_id = " + obj.getId());
|
|
|
+
|
|
|
+ //获取对应表信息
|
|
|
+ WbsTreePrivate tableTemp = wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, obj.getTableId()));
|
|
|
+ if (tableTemp != null && StringUtils.isNotEmpty(tableTemp.getInitTableName())) {
|
|
|
+ //删除实体表对应的数据信息
|
|
|
+ jdbcTemplate.execute("delete from " + tableTemp.getInitTableName() + " where id = " + id);
|
|
|
+ }
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return R.fail("操作失败");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|