测试问题修复
This commit is contained in:
parent
1ad50338ef
commit
c403f86bf9
|
|
@ -32,6 +32,14 @@ public class StringHelper {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public static String ifNUll(String string){
|
||||
if (StringHelper.isEmpty(string)){
|
||||
return "";
|
||||
}else{
|
||||
return "string";
|
||||
}
|
||||
}
|
||||
public static void writeText(String args) {
|
||||
File fp = new File("F:\\1.txt");
|
||||
PrintWriter pfp;
|
||||
|
|
|
|||
|
|
@ -221,6 +221,12 @@ public class MaterialUploadController {
|
|||
addProcess(bean);
|
||||
//针对审核退回,初始化工器具个人员的审核状态 0
|
||||
service.restoreToolsAndPerson(bean);
|
||||
|
||||
// 2024年审核流修改新增方法 把审核流程添加到child表中
|
||||
bean.setIdType("1");//承包商资质
|
||||
bean.setAuditStatus("0");//待审核
|
||||
bean.setProcessType("-1");
|
||||
service.addProgressChild(bean);
|
||||
ar.setSucceed(map,GlobalConst.DATA_SUCCEED);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package com.bonus.nxdt.energy.newcheck.controller;
|
||||
|
||||
import com.bonus.nxdt.energy.basic.entity.R;
|
||||
import com.bonus.nxdt.energy.constrator.entity.CheckManageBean;
|
||||
import com.bonus.nxdt.energy.constrator.service.CheckManageService;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableRequest;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableResponse;
|
||||
import com.bonus.nxdt.energy.newcheck.service.New_CheckManageService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 审核公用接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/new_checkManage")
|
||||
public class New_CheckManageController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(New_CheckManageController.class);
|
||||
|
||||
@Resource(name = "New_CheckManageService")
|
||||
private New_CheckManageService service;
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "审核-审核")
|
||||
public R save(@RequestBody CheckManageBean o) {
|
||||
return service.save(o);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "审核-列表")
|
||||
public PageTableResponse list(PageTableRequest request) {
|
||||
return service.list(request);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.bonus.nxdt.energy.newcheck.service;
|
||||
|
||||
|
||||
import com.bonus.nxdt.energy.basic.entity.R;
|
||||
import com.bonus.nxdt.energy.constrator.entity.CheckManageBean;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableRequest;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableResponse;
|
||||
|
||||
public interface New_CheckManageService {
|
||||
|
||||
R save(CheckManageBean o);
|
||||
|
||||
PageTableResponse list(PageTableRequest request);
|
||||
}
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
package com.bonus.nxdt.energy.newcheck.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.bonus.nxdt.energy.basic.entity.AmProcessType;
|
||||
import com.bonus.nxdt.energy.basic.entity.R;
|
||||
import com.bonus.nxdt.energy.constrator.dao.CheckManageDao;
|
||||
import com.bonus.nxdt.energy.constrator.entity.CheckManageBean;
|
||||
import com.bonus.nxdt.energy.constrator.entity.MapBean;
|
||||
import com.bonus.nxdt.energy.constrator.service.CheckManageService;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableHandler;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableRequest;
|
||||
import com.bonus.nxdt.energy.manager.table.PageTableResponse;
|
||||
import com.bonus.nxdt.energy.manager.utils.DateTimeHelper;
|
||||
import com.bonus.nxdt.energy.manager.utils.UserUtil;
|
||||
import com.bonus.nxdt.energy.manager.utils.WorkConfig;
|
||||
import com.bonus.nxdt.energy.newcheck.dao.New_CheckManageDao;
|
||||
import com.bonus.nxdt.energy.newcheck.service.New_CheckManageService;
|
||||
import com.bonus.nxdt.energy.newcheck.service.New_SubTeamService;
|
||||
import com.bonus.nxdt.energy.subManage.beans.ContractorTeamBean;
|
||||
import com.bonus.nxdt.energy.subManage.service.SubTeamService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service(value = "New_CheckManageService")
|
||||
public class New_CheckManageServiceImpl implements New_CheckManageService {
|
||||
|
||||
@Resource
|
||||
private New_CheckManageDao dao;
|
||||
|
||||
@Resource(name = "New_SubTeamService")
|
||||
private New_SubTeamService subTeamService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public R save(CheckManageBean o) {
|
||||
//1.添加审核数据
|
||||
//1.1 判断是固定流程还是动态流程
|
||||
if(!"-1".equals(o.getProcessType()) && !"1".equals(o.getIfFinal())){//固定流程
|
||||
//写一个SQL 查询出下一级别审核人
|
||||
AmProcessType amProcessType = dao.getFixeNextAuditId(o);
|
||||
if(amProcessType == null || "null".equals(amProcessType.getPhone())){
|
||||
o.setIfFinal("1");
|
||||
}else{
|
||||
o.setNextAuditId(Objects.requireNonNull(amProcessType).getPhone());
|
||||
o.setCountersignType(Objects.requireNonNull(amProcessType).getCountersignType());
|
||||
}
|
||||
|
||||
}
|
||||
String phone = Objects.requireNonNull(UserUtil.getLoginUser()).getPhone();
|
||||
String loginName = Objects.requireNonNull(UserUtil.getLoginUser()).getUserName();
|
||||
String orgId = Objects.requireNonNull(UserUtil.getLoginUser()).getOrgId();
|
||||
o.setAuditNameId(phone);
|
||||
o.setAuditDepartId(orgId);
|
||||
o.setCreateTime(DateTimeHelper.getNowTime());
|
||||
//是否插入数据,关系到后面的信息通知
|
||||
int ins = 0;
|
||||
//1.1查看一条数据是否规定人员全部审核过
|
||||
CheckManageBean bean = dao.getAuditTwoData(o);
|
||||
List<MapBean> list = dao.getMsgPerson(o);
|
||||
if(bean != null && bean.getAllNum()>(bean.getNum()+1) &&
|
||||
!"1".equals(o.getIfFinal()) && "2".equals(bean.getCountersignType())){
|
||||
//1.2如果多个人审核,第一个人审核时只改变数据,不生成数据
|
||||
if(bean.getBeforeAuditId() == null){
|
||||
o.setBeforeAuditId(phone);
|
||||
}else{
|
||||
o.setBeforeAuditId(o.getBeforeAuditId()+","+phone);
|
||||
}
|
||||
o.setNextAuditId(bean.getNextAuditId());
|
||||
int i = dao.updateCheckData(o);
|
||||
}else{
|
||||
ins = 1;
|
||||
//1.3审核通过,生成下一个人的审核数据
|
||||
String phones = dao.getAuditTwoPhone(o);
|
||||
o.setAuditNameId(phones);
|
||||
if("1".equals(o.getIfFinal())){
|
||||
o.setNextAuditId("-1");
|
||||
}
|
||||
int i = dao.checkData(o);
|
||||
}
|
||||
//asp 将文件的备注添加进去
|
||||
List<CheckManageBean> msgList = com.alibaba.fastjson.JSON.parseObject(o.getData(), new TypeReference<List<CheckManageBean>>() {
|
||||
});
|
||||
if(msgList != null){
|
||||
for (int i = 0; i < msgList.size(); i++) {
|
||||
dao.updateExamineMsg(msgList.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
//2.1更改主表审核状态
|
||||
if("1".equals(o.getAuditResult())){//点击了不通过,直接结束
|
||||
o.setAuditState("1");
|
||||
}else if("1".equals((o.getIfFinal()))){//终审
|
||||
o.setAuditState("2");
|
||||
}
|
||||
// -------------------------------------------------
|
||||
//3.1根据前端传值判断是哪个审核,改哪张表
|
||||
if("0".equals(o.getAuditStatus())){
|
||||
//承包商资质审核
|
||||
dao.updateConTractor(o);
|
||||
}else if("1".equals(o.getAuditStatus())){
|
||||
//分包商资质审核
|
||||
dao.updateSubQual(o);
|
||||
}else if("2".equals(o.getAuditStatus())){
|
||||
//人员资质审核
|
||||
dao.updateConsPerson(o);
|
||||
}else if("3".equals(o.getAuditStatus())){
|
||||
//工器具资质审核
|
||||
dao.updateTool(o);
|
||||
}else if("4".equals(o.getAuditStatus())){
|
||||
//人员入场资质审核
|
||||
if("2".equals(o.getAuditState())){
|
||||
o.setSpace("1");
|
||||
}else{
|
||||
o.setSpace("0");
|
||||
}
|
||||
dao.updateConsPersonEntrance(o);
|
||||
}else if("5".equals(o.getAuditStatus())){
|
||||
//承包商出场审核
|
||||
dao.updateConsAppear(o);
|
||||
//如果是最后一步或终审,关联数据出场
|
||||
if("2".equals(o.getAuditState())){
|
||||
//1.0班组和班组人员出场
|
||||
List<ContractorTeamBean> listTeam = dao.getContractorTeam(o);
|
||||
for (ContractorTeamBean a: listTeam) {
|
||||
subTeamService.delete(a.getId(), a.getMemberId());
|
||||
}
|
||||
//2.0承包商下人员出场
|
||||
dao.updateContractorPerson(o);
|
||||
}
|
||||
}else if("6".equals(o.getAuditStatus())){
|
||||
//人员出场资质审核
|
||||
if("2".equals(o.getAuditState())){
|
||||
o.setSpace("1");
|
||||
}else{
|
||||
o.setSpace("0");
|
||||
}
|
||||
dao.updateConsPersonAppera(o);
|
||||
}
|
||||
//4.1审核完成之后发送流传信息
|
||||
//查询需要发给哪些人,放到前面去查,可以区分下一个人,和以前的人
|
||||
// List<String> list= dao.getMsgPerson(o);
|
||||
if(ins>0){//至少一个流程走完
|
||||
//4.2.1给前面的流程人员发消息通知
|
||||
if(!"1".equals((o.getIfFinal()))){
|
||||
//非终审
|
||||
list.forEach(i -> {
|
||||
if("0".equals(o.getNextAuditId())){
|
||||
o.setName("总经理");
|
||||
}
|
||||
String msg = "【审核流转信息】"+loginName+phone+" 已审核,信息流转至"+o.getName()+"处";
|
||||
// dao.insertCheckMsg(i.getKey(),msg,o.getAuditStatus());
|
||||
});
|
||||
//4.2.2给下一个审核人发消息,如果是终审,直接结束
|
||||
List<MapBean> listAfter = dao.getDataByPhone(o.getNextAuditId());
|
||||
listAfter.forEach(i -> {
|
||||
String msg = "【审核流转信息】"+loginName+phone+" 将审核提交至"+i.getValue()+"处,请注意及时审核";
|
||||
// dao.insertCheckMsg(i.getKey(),msg,o.getAuditStatus());
|
||||
// setPhoneMsg(i.getPhone(),msg);
|
||||
});
|
||||
}else {
|
||||
//终审
|
||||
list.forEach(i -> {
|
||||
String sta = "通过";
|
||||
if("1".equals(o.getAuditResult())){
|
||||
sta = "未通过";
|
||||
}
|
||||
String msg = "【审核流转信息】"+loginName+phone+" 终审"+ sta +",流程结束";
|
||||
// dao.insertCheckMsg(i.getKey(),msg,o.getAuditStatus());
|
||||
});
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
private void setPhoneMsg(String phone,String msg){
|
||||
String url = WorkConfig.getPhoneSendPhone();;
|
||||
String uri = url+"&mobile="+ phone + "&content=【宁夏电投】提醒您:" + msg;
|
||||
HttpRequest.post(uri).execute(false).body();
|
||||
// try {
|
||||
// Thread.sleep(5000);
|
||||
// } catch (InterruptedException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageTableResponse list(PageTableRequest request) {
|
||||
return new PageTableHandler(new PageTableHandler.CountHandler() {
|
||||
@Override
|
||||
public int count(PageTableRequest request) {
|
||||
return dao.count(request.getParams());
|
||||
}
|
||||
}, new PageTableHandler.ListHandler() {
|
||||
@Override
|
||||
public List<CheckManageBean> list(PageTableRequest request) {
|
||||
List<CheckManageBean> list = dao.list(request.getParams(), request.getOffset(), request.getLimit());
|
||||
return list;
|
||||
}
|
||||
}).handle(request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ public class New_SubCheckManageServiceImpl implements New_SubCheckManageService
|
|||
String checkPhone = phone;
|
||||
i.setJumpType(auditType);
|
||||
System.err.println("checkPersonm="+checkPersonm);
|
||||
if(checkPersonm !=null && (checkPersonm.equals(phone) || checkPersonm.contains(phone))){
|
||||
if(checkPersonm !=null && (checkPersonm.equals(phone) || checkPersonm.contains(phone)) ){
|
||||
if(beforeAuditId == null){
|
||||
System.err.println("true-------------------------");
|
||||
i.setIsCheck("1");
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
|||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/nxdtenergy?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=nxdt@Bonus1234!
|
||||
spring.datasource.url=jdbc:mysql://192.168.0.14:1115/nxdtenergy?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=xbzadmin@szedu14!
|
||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/nxdtenergy?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
#spring.datasource.url=jdbc:mysql://192.168.0.14:1115/nxdtenergy?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
#spring.datasource.username=root
|
||||
#spring.datasource.password=Bonus@admin123
|
||||
#spring.datasource.password=xbzadmin@szedu14!
|
||||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/nxdtenergy?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=bonus@admin123!%
|
||||
spring.datasource.initialSize=5
|
||||
spring.datasource.minIdle=5xbzadmin@szedu14!
|
||||
spring.datasource.maxActive=60
|
||||
|
|
@ -39,12 +39,12 @@ mybatis.configuration.jdbc-type-for-null=null
|
|||
#spring.redis.host=127.0.0.1
|
||||
#spring.redis.port=6379
|
||||
#spring.redis.password=NXdt@279redis!
|
||||
spring.redis.host=192.168.0.14
|
||||
spring.redis.port=2005
|
||||
spring.redis.password=Xbzbns@Redis123!
|
||||
#spring.redis.host=127.0.0.1
|
||||
#spring.redis.port=6379
|
||||
#spring.redis.password=
|
||||
#spring.redis.host=192.168.0.14
|
||||
#spring.redis.port=2005
|
||||
#spring.redis.password=Xbzbns@Redis123!
|
||||
spring.redis.host=127.0.0.1
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=
|
||||
loginCode.expiration = 3
|
||||
loginCode.prefix = login_code
|
||||
logging.config=classpath:logback-boot.xml
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@
|
|||
) r ON r.cons_id = ap.cons_id
|
||||
LEFT JOIN sys_user ss ON ss.PHONE = r.audit_name_id
|
||||
WHERE
|
||||
ap.cons_id =#{params.auditProcess} and ap.is_active = '1'
|
||||
ap.audit_id = #{params.auditProcessId} and ap.cons_id =#{params.id} and ap.is_active = '1'
|
||||
GROUP BY
|
||||
ap.id
|
||||
ORDER BY
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
) r ON r.cons_id = ap.cons_id
|
||||
LEFT JOIN sys_user ss ON ss.PHONE = r.audit_name_id
|
||||
WHERE
|
||||
ap.audit_id = #{params.auditProcessId} and ap.cons_id =#{params.auditProcess} and ap.is_active = '1'
|
||||
ap.audit_id = #{params.auditProcessId} and ap.cons_id =#{params.id} and ap.is_active = '1'
|
||||
GROUP BY
|
||||
ap.id
|
||||
ORDER BY
|
||||
|
|
|
|||
|
|
@ -68,7 +68,10 @@
|
|||
</update>
|
||||
<update id="recallConsById">
|
||||
update `contractor_qualication` set audit_status = '5'
|
||||
where contrator_id = #{consId} and project_id =#{proId}
|
||||
where contrator_id = #{consId} and project_id =#{proId};
|
||||
|
||||
UPDATE AUDIT_PROSS_CHILD SET AUDIT_STATUS ='5'
|
||||
where cons_id = #{consId} and pro_id = #{proId} and audit_type ='1'
|
||||
</update>
|
||||
|
||||
<update id="recallConsById6">
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
<if test="auditStatus != null and auditStatus != ''">
|
||||
and apc.audit_status = #{auditStatus}
|
||||
</if>
|
||||
order by cq.id,ap.create_time desc
|
||||
<!-- order by cq.id,ap.create_time desc-->
|
||||
ORDER BY apc.id desc
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
|
@ -63,6 +64,7 @@
|
|||
,apc.id as childId
|
||||
,ap.next_audit_id
|
||||
,ap.create_time as createTime
|
||||
,ap.before_audit_id as beforeAuditId
|
||||
|
||||
FROM
|
||||
contractor_qualication cq
|
||||
|
|
@ -166,7 +168,7 @@
|
|||
LEFT JOIN type_work tw ON tw.id = cpq.job
|
||||
WHERE
|
||||
cpq.contrator_id = #{contractorId}
|
||||
and (cpq.appera_status != '2' OR cpq.appera_status is null)
|
||||
and (cpq.appera_status != '1' OR cpq.appera_status is null)
|
||||
and is_active ='1'
|
||||
<if test="clickType == 1 or clickType =='1'">
|
||||
<if test="auditType ==2 or auditType =='2'">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
var auditProcess = localStorage.getItem("auditProcess");
|
||||
var auditStatus = localStorage.getItem("auditStatus");
|
||||
var consId = localStorage.getItem("consId");
|
||||
var pers = checkPermission();
|
||||
var example;
|
||||
let layer;
|
||||
|
|
@ -12,7 +13,6 @@ layui.use(['form', 'layer'], function () {
|
|||
$("#searchBt").click(function () {
|
||||
reloadingPage();
|
||||
});
|
||||
|
||||
init();
|
||||
|
||||
});
|
||||
|
|
@ -36,8 +36,8 @@ function init() {
|
|||
"url": ctxPath + "/checkManage/",
|
||||
"type": "get",
|
||||
"data": function (d) {
|
||||
d.auditProcess = auditProcess;
|
||||
d.auditStatus = auditStatus;
|
||||
d.auditProcessId = auditProcess;
|
||||
d.id = consId;
|
||||
},
|
||||
"error": function (xhr, textStatus, errorThrown) {
|
||||
var msg = xhr.responseText;
|
||||
|
|
@ -114,8 +114,10 @@ function init() {
|
|||
"render": function (data, type, row) {
|
||||
var auditResult = row['auditResult'];
|
||||
let html;
|
||||
if(auditResult==="0"){
|
||||
if(auditResult==="1"){
|
||||
html = "<span style='color: green;cursor: pointer;' title=''>通过</span>";
|
||||
}else if(auditResult==="2"){
|
||||
html = "<span style='color: black;cursor: pointer;' title=''>发起</span>";
|
||||
}else{
|
||||
html = "<span style='color: red;cursor: pointer;' title=''>不通过</span>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ layui.use(['form', 'upload'], function () {
|
|||
});
|
||||
|
||||
//是否已预设过审批流
|
||||
alert(JSON.stringify(checkData));
|
||||
// alert(JSON.stringify(checkData));
|
||||
isDefaultProcess(checkData.processType);
|
||||
|
||||
form.render();
|
||||
|
|
@ -877,7 +877,7 @@ function personRosterClick() {
|
|||
var index = layer.open({
|
||||
title: ['人员花名册', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../../../pages/newWork/constrator/material/personRoster.html',
|
||||
content: '../../pages/newWork/constrator/material/personRoster.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
|
|
|
|||
|
|
@ -744,7 +744,7 @@ function personRosterClick() {
|
|||
var index = layer.open({
|
||||
title: ['人员花名册', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../../../pages/newWork/constrator/material/personRoster.html',
|
||||
content: '../../pages/newWork/constrator/material/personRoster.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
|
|
|
|||
|
|
@ -871,7 +871,7 @@ function personRosterClick() {
|
|||
var index = layer.open({
|
||||
title: ['人员花名册', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../../../pages/newWork/constrator/material/personRoster.html',
|
||||
content: '../../pages/newWork/constrator/material/personRoster.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ layui.use(['table', 'form', 'laydate'], function () {
|
|||
}
|
||||
, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
|
||||
let result;
|
||||
console.log(JSON.stringify(res));
|
||||
if (res.count > 0) {
|
||||
if (this.page.curr) {
|
||||
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
|
||||
|
|
@ -146,12 +147,11 @@ layui.use(['table', 'form', 'laydate'], function () {
|
|||
|
||||
//审核
|
||||
function check(data) {
|
||||
alert(111);
|
||||
console.log("111")
|
||||
localStorage.setItem("proId",data.projectId);
|
||||
localStorage.setItem("consId",data.contractorId);
|
||||
localStorage.setItem("consName",data.contractorName);
|
||||
localStorage.setItem("newDataMsg",data.newDataMsg);
|
||||
localStorage.setItem("auditProcess",data.auditProcess);
|
||||
layui.data('checkData', {
|
||||
key: 'data',
|
||||
value: {
|
||||
|
|
@ -197,12 +197,18 @@ function check(data) {
|
|||
//查看审核流程
|
||||
function view(data) {
|
||||
localStorage.setItem("consId", data.contractorId);
|
||||
localStorage.setItem("auditProcess", data.auditProcess);
|
||||
localStorage.setItem("auditStatus", data.auditStatus);
|
||||
|
||||
//auditProcess
|
||||
console.log(JSON.stringify(data))
|
||||
let height = '90%';
|
||||
let width = '80%';
|
||||
var index = layer.open({
|
||||
title: ['审核流程', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../audit/auditProcess.html',
|
||||
//content: '../work/audit/auditProcess.html',
|
||||
content: './auditProcess_new.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
|
|
@ -224,7 +230,7 @@ function viewFlow(data) {
|
|||
localStorage.setItem("proId",data.projectId);
|
||||
localStorage.setItem("consId",data.contractorId);
|
||||
localStorage.setItem("consName",data.contractorName);
|
||||
|
||||
localStorage.setItem("auditProcess",data.auditProcess);
|
||||
layui.data('checkData', {
|
||||
key: 'data',
|
||||
value: {
|
||||
|
|
@ -239,7 +245,7 @@ function viewFlow(data) {
|
|||
'isManger': data.isManger
|
||||
}
|
||||
});
|
||||
let page = 'datumCheckView5.html';
|
||||
let page = 'datumCheckView5_new.html';
|
||||
let height = '98%';
|
||||
let width = '98%';
|
||||
var index = layer.open({
|
||||
|
|
|
|||
|
|
@ -864,7 +864,7 @@ function personRosterClick(type) {
|
|||
var index = layer.open({
|
||||
title: ['人员花名册', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../../../pages/newWork/constrator/material/personRoster.html',
|
||||
content: '../../pages/newWork/constrator/material/personRoster.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function historyshow(){
|
|||
var index = layer.open({
|
||||
title: ['历史审核记录查看', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../../../pages/newWork/constrator/material/audithistoryShow.html',
|
||||
content: '../../pages/newWork/constrator/material/audithistoryShow.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
|
|
@ -829,7 +829,7 @@ function addFlow() {
|
|||
let index = layer.open({
|
||||
title: ['新增', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: '../basic/ExamFlowForm.html',
|
||||
content: '../work/basic/ExamFlowForm.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
btn: ['确定', '关闭'],
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../../css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../../css/dataTables.bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../../layui/css/layui.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../css/dataTables.bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../../layui/css/layui.css">
|
||||
|
||||
|
||||
<style>
|
||||
|
|
@ -59,13 +59,13 @@
|
|||
</body>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript" src="../../../js/libs/jquery-3.6.0.js"></script>
|
||||
<script type="text/javascript" src="../../../js/jq.js"></script>
|
||||
<script type="text/javascript" src="../../../js/plugin/datatables/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="../../../js/plugin/datatables/dataTables.bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../../../js/my/permission.js"></script>
|
||||
<script type="text/javascript" src="../../../layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../../js/dict.js"></script>
|
||||
<script type="text/javascript" src="../../../js/select.js"></script>
|
||||
<script type="text/javascript" src="../../../js/work/auditDatum/auditProcess.js"></script>
|
||||
<script type="text/javascript" src="../../js/libs/jquery-3.6.0.js"></script>
|
||||
<script type="text/javascript" src="../../js/jq.js"></script>
|
||||
<script type="text/javascript" src="../../js/plugin/datatables/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/plugin/datatables/dataTables.bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/my/permission.js"></script>
|
||||
<script type="text/javascript" src="../../layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../js/dict.js"></script>
|
||||
<script type="text/javascript" src="../../js/select.js"></script>
|
||||
<script type="text/javascript" src="../../js/newCheck/auditProcess_new.js"></script>
|
||||
|
|
|
|||
|
|
@ -101,14 +101,16 @@
|
|||
<script type="text/html" id="barTable">
|
||||
|
||||
|
||||
{{# if(d.isCheck == '1' ){ }}
|
||||
{{# if(d.isCheck == '1' && d.auditStatus != '5'){ }}
|
||||
<a lay-event="check" style="color: #009688;font-size: 16px;cursor:pointer;">审核</a>
|
||||
{{# } }}
|
||||
{{# if(d.isCheck == '0'){ }}
|
||||
{{# if(d.isCheck == '0' && d.auditStatus != '5'){ }}
|
||||
<a lay-event="viewFlow" style="color: #009688;font-size: 16px;cursor:pointer;">查看</a>
|
||||
{{# } }}
|
||||
{{# if(d.auditStatus != '5'){ }}
|
||||
<span> | </span>
|
||||
<a lay-event="view" style="color: #009688;font-size: 16px;cursor:pointer;">审核流程</a>
|
||||
{{# } }}
|
||||
<!-- <a class="layui-btn layui-btn-sm" lay-event="del">更多</a>-->
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,46 @@
|
|||
package com.bonus.nxdt.energy.constrator.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bonus.nxdt.energy.constrator.entity.CheckManageBean;
|
||||
import com.bonus.nxdt.energy.manager.utils.StringHelper;
|
||||
import com.sun.javafx.collections.MappingChange;
|
||||
|
||||
import java.util.Scanner;
|
||||
import java.util.*;
|
||||
|
||||
class ConsServiceImplTest {
|
||||
|
||||
static TreeMap<String,String> map = new TreeMap<>();
|
||||
public static void main(String[] args) {
|
||||
CheckManageBean n = new CheckManageBean();
|
||||
System.err.println("nnn="+n);
|
||||
String str = "[{\"title\":\"A-1\",\"id\":1,\"field\":\"name1\",\"spread\":true,\"children\":[{\"title\":\"B-1-1 可允许跳转\",\"id\":3,\"field\":\"name11\",\"href\":\"\",\"children\":[{\"title\":\"C-1-1-3\",\"id\":23,\"field\":\"\",\"children\":[{\"title\":\"D-1-1-3-1\",\"id\":24,\"field\":\"\",\"children\":[{\"title\":\"E-1-1-3-1-1\",\"id\":30,\"field\":\"\"},{\"title\":\"E-1-1-3-1-2\",\"id\":31,\"field\":\"\"}]}]},{\"title\":\"C-1-1-1\",\"id\":7,\"field\":\"\",\"children\":[{\"title\":\"D-1-1-1-1 可允许跳转\",\"id\":15,\"field\":\"\",\"href\":\"\"}]},{\"title\":\"C-1-1-2\",\"id\":8,\"field\":\"\",\"children\":[{\"title\":\"D-1-1-2-1\",\"id\":32,\"field\":\"\"}]}]},{\"title\":\"B-1-2\",\"id\":4,\"spread\":true,\"children\":[{\"title\":\"C-1-2-1\",\"id\":9,\"field\":\"\"},{\"title\":\"C-1-2-2\",\"id\":10,\"field\":\"\"}]},{\"title\":\"B-1-3\",\"id\":20,\"field\":\"\",\"children\":[{\"title\":\"C-1-3-1\",\"id\":21,\"field\":\"\"},{\"title\":\"C-1-3-2\",\"id\":22,\"field\":\"\"}]}]},{\"title\":\"A-2\",\"id\":2,\"field\":\"\",\"spread\":true,\"children\":[{\"title\":\"B-2-1\",\"id\":5,\"field\":\"\",\"spread\":true,\"children\":[{\"title\":\"C-2-1-2\",\"id\":12,\"field\":\"\"}]}]},{\"title\":\"A-3\",\"id\":16,\"field\":\"\",\"children\":[{\"title\":\"B-3-1\",\"id\":17,\"field\":\"\",\"fixed\":true,\"children\":[{\"title\":\"C-3-1-1\",\"id\":18,\"field\":\"\"},{\"title\":\"C-3-1-2\",\"id\":19,\"field\":\"\"}]},{\"title\":\"B-3-2\",\"id\":27,\"field\":\"\",\"children\":[{\"title\":\"C-3-2-1\",\"id\":28,\"field\":\"\"},{\"title\":\"C-3-2-2\",\"id\":29,\"field\":\"\"}]}]}]";
|
||||
getChild(str);
|
||||
for (Map.Entry<String, String> m : map.entrySet()) {
|
||||
System.out.println("key:" + m.getKey() + " title:" + m.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void getChild(String jsonStr){
|
||||
JSONArray jsonArray = JSONArray.parseArray(jsonStr);
|
||||
for(int i=0;i<jsonArray.size();i++){
|
||||
JSONObject childJson = JSONObject.parseObject(jsonArray.getString(i));
|
||||
try {
|
||||
String children = childJson.getString("children");
|
||||
String title = childJson.getString("title");
|
||||
String id = childJson.getString("id");
|
||||
String field = childJson.getString("field");
|
||||
String spread = childJson.getString("spread");
|
||||
if(StringHelper.isEmpty(children)){
|
||||
map.put(id,title);
|
||||
}
|
||||
getChild(children);
|
||||
}catch (NullPointerException e){
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue