|
@@ -597,6 +597,73 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
return R.data(status);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询节点状态
|
|
|
+ */
|
|
|
+ @PostMapping("/queryNodeStatus-sj")
|
|
|
+ @ApiOperationSupport(order = 23)
|
|
|
+ @ApiOperation(value = "/查询节点状态-首件")
|
|
|
+ @ApiModelProperty(value = "id",notes = "当前该条首件的记录id")
|
|
|
+ public R<String> queryNodeStatusSj(@RequestParam String primaryKeyId, @RequestParam String classify,String id) {
|
|
|
+ //记录状态
|
|
|
+ String status = "1";
|
|
|
+ //查询填报状态,type=3首件
|
|
|
+ InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery()
|
|
|
+ .eq(InformationQuery::getId,id)
|
|
|
+ .eq(InformationQuery::getType, 3)
|
|
|
+ );
|
|
|
+ if (businessData != null) {
|
|
|
+ switch (businessData.getStatus()) {
|
|
|
+ case 0:
|
|
|
+ case 3:
|
|
|
+ //0属于未上报,3属于已废除,统一为待上报
|
|
|
+ status = "2";
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ case 2:
|
|
|
+ //1属于待审批,2属于已审批,统一为已上报
|
|
|
+ status = "3";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ //如果不匹配,默认为未填报
|
|
|
+ status = "1";
|
|
|
+ //查询表格
|
|
|
+ WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
|
|
|
+ if (ObjectUtils.isNotEmpty(obj)) {
|
|
|
+ List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(obj, "queryTable", classify);
|
|
|
+ if (tableList != null && tableList.size() > 0) {
|
|
|
+ for (WbsTreeContract table : tableList) {
|
|
|
+ if (new Integer("2").equals(table.getIsTabPdf())) {
|
|
|
+ //这些表格中,但凡有一个能够预览,就开放预览
|
|
|
+ status = "2";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //查询表格
|
|
|
+ WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
|
|
|
+ if (ObjectUtils.isNotEmpty(obj)) {
|
|
|
+ List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(obj, "queryTable", classify);
|
|
|
+ if (tableList != null && tableList.size() > 0) {
|
|
|
+ for (WbsTreeContract table : tableList) {
|
|
|
+ if (new Integer("2").equals(table.getIsTabPdf())) {
|
|
|
+ //这些表格中,但凡有一个能够预览,就开放预览
|
|
|
+ status = "2";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return R.data(status);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询节点状态-试验
|
|
|
*/
|