| | |
| | | * @since 1.0.0 2023-11-07 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/project/") |
| | | @RequestMapping("/project/Project/") |
| | | @Api(tags="project") |
| | | public class ProjectController { |
| | | @Autowired |
| | |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "entrustUnitName", value = "委托单位名称", dataType = Constant.QT.STRING, format = "entrust_unit_name^LK"), @ApiImplicitParam(name = "developUnitName", value = "开发单位名称", dataType = Constant.QT.STRING, format = "develop_unit_name^LK"), @ApiImplicitParam(name = "software", value = "软件名称", dataType = Constant.QT.STRING, format = "software^LK"), @ApiImplicitParam(name = "code", value = "项目编号", dataType = Constant.QT.STRING, format = "CODE^LK"), @ApiImplicitParam(name = "identity", value = "项目标识", dataType = Constant.QT.STRING, format = "IDENTITY^LK"), @ApiImplicitParam(name = "criticalLevel", value = "关键等级", dataType = Constant.QT.STRING, format = "critical_level^EQ"), @ApiImplicitParam(name = "testLevel", value = "测试级别", dataType = Constant.QT.STRING, format = "test_level^EQ") }) |
| | | @ApiImplicitParam(name = "softwareName", value = "软件名称", dataType = Constant.QT.STRING, format = "software_name^LK"), @ApiImplicitParam(name = "secretClass", value = "密级", dataType = Constant.QT.STRING, format = "secret_class^EQ"), @ApiImplicitParam(name = "criticalLevel", value = "关键等级", dataType = Constant.QT.STRING, format = "critical_level^EQ"), @ApiImplicitParam(name = "testLevel", value = "测试级别", dataType = Constant.QT.STRING, format = "test_level^EQ"), @ApiImplicitParam(name = "softwareType", value = "软件类型", dataType = Constant.QT.STRING, format = "software_type^EQ"), @ApiImplicitParam(name = "isContract", value = "是否签署合同", dataType = Constant.QT.STRING, format = "is_contract^EQ") }) |
| | | public PageResult<Project> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return PageResult.ok(projectService.page(queryFilter)); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.zt.life.modules.maintain.newplan.dao.TaskCenterDao"> |
| | | <delete id="deleteTable"> |
| | | drop table ${tableName} |
| | | </delete> |
| | | |
| | | <select id="page" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT |
| | | a.id, |
| | | a.prev_id, |
| | | a.prev_step_id, |
| | | a.flow_id, |
| | | a.step_id, |
| | | a.step_name, |
| | | a.biz_id, |
| | | a.title, |
| | | a.sender_id, |
| | | a.sender_name, |
| | | a.sender_time, |
| | | a.group_id, |
| | | a.receive_id, |
| | | a.receive_name, |
| | | a.receive_time, |
| | | a.open_time, |
| | | /* a.finish_time,*/ |
| | | a.finish_time2, |
| | | a.comment, |
| | | a.is_sign, |
| | | a.sort, |
| | | a.note, |
| | | a.remark, |
| | | a.is_delete, |
| | | a.dept_id, |
| | | a.company_id, |
| | | a.tenant_id, |
| | | a.topic, |
| | | a.apply_user_id, |
| | | a.apply_time, |
| | | /* a.apply_user,*/ |
| | | a.step_marker, |
| | | /*--step_router,*/ |
| | | a.flow_code, |
| | | a.group_id2, |
| | | a.finish_id, |
| | | a.finish_name, |
| | | a.biz_group_id, |
| | | a.opinion, |
| | | (case when status = 1 then '被驳回' else '' end) as statusName, |
| | | DateDiff(CURRENT_DATE,a.RECEIVE_TIME) as idleDays, |
| | | a.topic AS taskName, |
| | | a.step_name as taskType, |
| | | a.biz_id as id, |
| | | 0 as Product_id, |
| | | 0 as MAINTAIN_LEVEL, |
| | | 0 as YEAR, |
| | | a.RECEIVE_NAME as apply_user, |
| | | date_add(a.RECEIVE_TIME,interval 7 day) AS finishTime, |
| | | a.STEP_ID as APPROVE_STEP_ID, |
| | | a.STEP_MARKER, |
| | | a.FLOW_CODE, |
| | | a.APPLY_USER as taskPeople, |
| | | 2 code, |
| | | a.title as summary, |
| | | b.STEP_ROUTER, |
| | | b.STEP_ROUTER_ID |
| | | FROM DJ_WF_RUN_TASK a |
| | | left join DJ_WF_DEF_STEP b on a.step_id = b.id |
| | | WHERE a.is_delete =0 and a.status in (0,1) |
| | | AND a.RECEIVE_ID = #{userId} |
| | | <if test="projectId != null and projectId != ''"> |
| | | and a.biz_group_id = #{projectId} |
| | | </if> |
| | | <if test="djxlSystem != null and djxlSystem != ''"> |
| | | and a.FLOW_ID in (select id from dj_wf_def where system_type = #{djxlSystem}) |
| | | </if> |
| | | ORDER BY a.receive_time DESC |
| | | </select> |
| | | |
| | | <update id="pageDone_temp"> |
| | | drop table if exists ${pageDone_temp1}; |
| | | create table ${pageDone_temp1} as |
| | | SELECT * FROM ( |
| | | SELECT |
| | | a1.id, |
| | | a1.title, |
| | | a1.topic, |
| | | a1.remark, |
| | | a1.biz_id, |
| | | a1.biz_group_id, |
| | | a1.flow_code, |
| | | a1.step_id, |
| | | a1.step_marker, |
| | | /*a.step_name as step_name_my,*/ |
| | | a1.receive_name as sender_name, |
| | | a1.receive_time, |
| | | a1.finish_time as finish_time, |
| | | a1.status |
| | | FROM DJ_WF_RUN_TASK a1 |
| | | WHERE a1.is_delete = 0 |
| | | and (a1.receive_id=#{userId} |
| | | or EXISTS(SELECT 1 FROM dj_sys_role s1,dj_sys_role_user s2 WHERE s1.ID = s2.role_id AND s2.USER_id = #{userId} AND |
| | | s2.is_delete=0 and s1.CODE in ('all','xtglybm'))) |
| | | <if test="djxlSystem != null and djxlSystem != ''"> |
| | | and a1.FLOW_ID in (select id from dj_wf_def where system_type = #{djxlSystem}) |
| | | </if> |
| | | |
| | | ) a2 |
| | | where status in (20,10) |
| | | group by a2.biz_id,a2.flow_code,a2.step_id; |
| | | |
| | | drop table if exists ${pageDone_temp2}; |
| | | create table ${pageDone_temp2} as |
| | | select * from |
| | | (select |
| | | b1.prev_id, |
| | | b1.group_id, |
| | | b1.biz_id, |
| | | b1.flow_code, |
| | | b1.step_id, |
| | | b1.step_marker, |
| | | b1.step_name, |
| | | b1.receive_name, |
| | | b1.receive_time, |
| | | b1.status |
| | | from ${pageDone_temp1} a1, |
| | | DJ_WF_RUN_TASK b1 |
| | | WHERE b1.is_delete = 0 |
| | | and b1.status in(0,1,100) |
| | | |
| | | and a1.biz_id = b1.biz_id |
| | | and a1.flow_code = b1.flow_code |
| | | order by b1.receive_time DESC |
| | | ) b2 group by biz_id,flow_code,step_id; |
| | | </update> |
| | | |
| | | <select id="pageDone" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT |
| | | a.id, |
| | | a.title, |
| | | a.topic, |
| | | a.remark, |
| | | a.biz_id, |
| | | a.flow_code, |
| | | a.biz_group_id, |
| | | c.STEP_READ_ROUTER_ID, |
| | | a.sender_name, |
| | | a.finish_time, |
| | | b.prev_id, |
| | | b.step_marker, |
| | | b.step_name, |
| | | case when c.CAN_RECALL=1 and a.id=b.prev_id and c.step_no < d.step_no and d.step_no < 100 |
| | | then 1 else 0 end as canRecall, |
| | | c.step_no as myStepNo, |
| | | d.step_no as curStepNo, |
| | | (select group_concat(DISTINCT receive_name) from ${pageDone_temp2} s where s.group_id=b.group_id limit 0,3) receive_name, |
| | | b.receive_time, |
| | | (case when a.status = 10 then '驳回' else '' end) as statusName, |
| | | c.name as finishStepName, |
| | | a.sender_name as finishUserName |
| | | FROM ${pageDone_temp1} a |
| | | join ${pageDone_temp2} b on a.biz_id = b.biz_id and a.flow_code = b.flow_code |
| | | left join DJ_WF_DEF_STEP c on a.step_id = c.id |
| | | left join DJ_WF_DEF_STEP d on b.step_id = d.id |
| | | group by a.biz_id,a.flow_code,a.step_id |
| | | ORDER BY a.receive_time DESC |
| | | </select> |
| | | |
| | | <select id="page2" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT |
| | | 0 as bizGroupId, |
| | | CONCAT(p.Name, '-', a.YEAR, '-', c.Dict_label ) AS topic, |
| | | case when a.CURRENT_STATE =1 then '助理修改计划' else '处长审批计划' end AS step_name, |
| | | case when a.CURRENT_STATE =1 then '驳回' else '' end AS statusName, |
| | | a.id, |
| | | '80' STEP_ID, |
| | | case when a.CURRENT_STATE =1 then 'zl' else 'cz' end AS STEP_MARKER, |
| | | 'yearPlan' as FLOW_CODE, |
| | | u.nick_name as APPLY_USER, |
| | | 2 as code, |
| | | '年度修理计划' as title, |
| | | '年度修理计划' as remark, |
| | | a.create_date AS RECEIVE_TIME, |
| | | DateDiff(CURRENT_DATE,a.create_date) as idleDays |
| | | FROM |
| | | DJ_ZHGL_ANNUAL_PLAN a |
| | | LEFT JOIN view_zt_boat_tree p on concat(a.product_id) = p.product_id |
| | | LEFT JOIN DJ_SYS_DICT_DATA c ON a.maintain_level = c.Dict_Value |
| | | AND dict_type_id IN(SELECT id FROM DJ_SYS_DICT_TYPE WHERE DICT_TYPE = 'question_level_type') |
| | | LEFT JOIN SYS_USER u ON u.user_id = a.CREATOR |
| | | WHERE a.is_delete = 0 |
| | | and ( |
| | | (CURRENT_STATE = 1 |
| | | and EXISTS(SELECT 1 FROM dj_sys_role s1,dj_sys_role_user s2 |
| | | WHERE s1.ID = s2.role_id AND s2.USER_id = #{userId} AND |
| | | s2.is_delete=0 and s1.CODE = 'zlbm') |
| | | ) or ( |
| | | CURRENT_STATE = '5' |
| | | and EXISTS(SELECT 1 FROM dj_sys_role s1,dj_sys_role_user s2 |
| | | WHERE s1.ID = s2.role_id AND s2.USER_id = #{userId} AND |
| | | s2.is_delete=0 and s1.CODE = 'czbm') |
| | | ) |
| | | ) |
| | | order by a.update_date desc limit 0,1 |
| | | </select> |
| | | |
| | | <select id="pageDone2" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select *, |
| | | case |
| | | when STEP_MARKER = 'zl' then '处长审核' |
| | | when STEP_MARKER = 'cz' then '助理编报' |
| | | else '处长审核' end as finishStepName, |
| | | case |
| | | when STEP_MARKER = 'zl' then '处长' |
| | | when STEP_MARKER = 'cz' then '助理' |
| | | else '处长' end as finishUserName |
| | | from ( |
| | | SELECT 0 as bizGroupId, |
| | | CONCAT(p.Name, '-', a.YEAR, '-', c.Dict_label) AS topic, |
| | | case |
| | | when a.CURRENT_STATE = 1 then '助理修改计划' |
| | | when a.CURRENT_STATE = 5 then '处长审批计划' |
| | | else '完成' end AS step_name, |
| | | case when a.CURRENT_STATE = 1 then '驳回' else '' end AS statusName, |
| | | a.id, |
| | | '90' as STEP_ID, |
| | | case |
| | | when a.CURRENT_STATE = 1 then 'zl' |
| | | when a.CURRENT_STATE = 5 then 'cz' |
| | | else 'wc' end as STEP_MARKER, |
| | | a.id as bizId, |
| | | 'yearPlan2' as FLOW_CODE, |
| | | u.nick_name as APPLY_USER, |
| | | 2 as code, |
| | | '年度修理计划' as title, |
| | | '年度修理计划' as remark, |
| | | a.UPDATE_DATE AS RECEIVE_TIME, |
| | | case |
| | | when a.CURRENT_STATE = 1 then '助理' |
| | | when a.CURRENT_STATE = 5 then '处长' |
| | | else '' end AS receiveName, |
| | | DateDiff(CURRENT_DATE, a.create_date) as idleDays |
| | | FROM DJ_ZHGL_ANNUAL_PLAN a |
| | | LEFT JOIN view_zt_boat_tree p on concat(a.product_id) = p.product_id |
| | | LEFT JOIN DJ_SYS_DICT_DATA c ON a.maintain_level = c.Dict_Value |
| | | AND dict_type_id IN (SELECT id FROM DJ_SYS_DICT_TYPE WHERE DICT_TYPE = 'question_level_type') |
| | | LEFT JOIN SYS_USER u ON u.user_id = a.UPDATER |
| | | WHERE a.is_delete = 0 |
| | | and ( |
| | | (CURRENT_STATE in (1, 10) |
| | | and EXISTS(SELECT 1 |
| | | FROM dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE s2.IS_DELETE = 0 |
| | | and s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'czbm') |
| | | ) |
| | | or ( |
| | | CURRENT_STATE in (5, 10) |
| | | and EXISTS(SELECT 1 |
| | | FROM dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE s2.IS_DELETE = 0 |
| | | and s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zlbm') |
| | | ) |
| | | or ( CURRENT_STATE in (1, 5, 10) |
| | | and EXISTS(SELECT 1 |
| | | FROM dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s2.is_delete = 0 |
| | | and s1.CODE in ('all', 'xtglybm')) |
| | | ) |
| | | ) |
| | | ) as c |
| | | order by c.RECEIVE_TIME desc |
| | | </select> |
| | | |
| | | <!-- |
| | | <select id="page3" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select |
| | | a.stepRouterId, |
| | | a.project_id as bizGroupId, |
| | | b.MODEL_NAME AS topic, |
| | | '日计划' as title, |
| | | plan_date as remark, |
| | | step_name, |
| | | a.id, |
| | | '0' STEP_ID, |
| | | a.STEP_MARKER, |
| | | 'rjhFlow' as FLOW_CODE, |
| | | c.user_name as APPLY_USER, |
| | | '' as code, |
| | | a.create_date AS RECEIVE_TIME, |
| | | DateDiff(CURRENT_DATE,a.create_date) as idleDays |
| | | from |
| | | ( |
| | | SELECT |
| | | *,'rjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1648318473140449281' as stepRouterId |
| | | FROM |
| | | dj_wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | union |
| | | SELECT |
| | | *,'rjh_sh' as STEP_MARKER,'部门长审核' as STEP_Name,'1648318806923161601' as stepRouterId |
| | | FROM |
| | | dj_wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_sh' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'ywzbm' |
| | | ) |
| | | union |
| | | SELECT |
| | | *,'rjh_cjfk' as STEP_MARKER,'厂家反馈情况' as STEP_MARKER,'1648319132719919106' as stepRouterId |
| | | FROM |
| | | dj_wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_fk' |
| | | AND cjfk_Status = 0 |
| | | AND MAINTAIN_UNIT = #{deptId} |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'cjbm' |
| | | ) |
| | | union |
| | | SELECT |
| | | *,'rjh_tyfk' as STEP_MARKER,'艇员反馈助修情况' as STEP_Name,'1648318988234534914' as stepRouterId |
| | | FROM |
| | | dj_wx_daily_plan |
| | | WHERE |
| | | IS_DELETE =0 |
| | | and FLOW_Status = 'rjh_fk' |
| | | AND tyfk_Status = 0 |
| | | AND REPAIR_PERSONNEL = #{userId} |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'tybm' |
| | | ) |
| | | GROUP BY |
| | | project_id, |
| | | plan_date |
| | | ) a |
| | | left join dj_wx_project b on a.project_id = b.id |
| | | left join sys_user c on a.SUBMIT_PERSONNEL = c.user_id |
| | | </select> |
| | | --> |
| | | |
| | | <select id="page3" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | select |
| | | a.stepRouterId, |
| | | a.project_id as bizGroupId, |
| | | b.MODEL_NAME AS topic, |
| | | a.title, |
| | | a.remark, |
| | | step_name, |
| | | a.id, |
| | | '0' STEP_ID, |
| | | a.STEP_MARKER, |
| | | a.FLOW_CODE, |
| | | c.user_name as APPLY_USER, |
| | | '' as code, |
| | | a.create_date AS RECEIVE_TIME, |
| | | DateDiff(CURRENT_DATE,a.create_date) as idleDays |
| | | from |
| | | ( |
| | | SELECT |
| | | id,project_id,create_date,SUBMIT_PERSONNEL, |
| | | '月计划' as title, |
| | | concat('月计划 (', select_date, ')') as remark, |
| | | 'monthPlanFlow' as FLOW_CODE, |
| | | 'yjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1660911405324423170' as stepRouterId |
| | | FROM |
| | | dj_wx_weekly_month_plan |
| | | WHERE |
| | | IS_DELETE = 0 |
| | | and PLAN_TYPE = 1 |
| | | and FLOW_Status = 'yjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s1.IS_DELETE=0 |
| | | AND s2.IS_DELETE=0 |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | GROUP BY |
| | | project_id, select_date |
| | | union |
| | | SELECT |
| | | id,project_id,create_date,SUBMIT_PERSONNEL, |
| | | '周计划' as title, |
| | | concat('周计划 (', select_date, ')') as remark, |
| | | 'weekPlanFlow' as FLOW_CODE, |
| | | 'zjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1660904721482895361' as stepRouterId |
| | | FROM |
| | | dj_wx_weekly_month_plan |
| | | WHERE |
| | | IS_DELETE = 0 |
| | | and PLAN_TYPE = 0 |
| | | and FLOW_Status = 'zjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s1.IS_DELETE=0 |
| | | AND s2.IS_DELETE=0 |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | GROUP BY |
| | | project_id, select_date |
| | | union |
| | | SELECT |
| | | id,project_id,create_date,SUBMIT_PERSONNEL, |
| | | '日计划' as title, |
| | | concat('日计划 (', plan_date, ')') as remark, |
| | | 'rjhFlow' as FLOW_CODE, |
| | | 'rjh_hz' as STEP_MARKER,'总厂汇总' as STEP_Name,'1648318473140449281' as stepRouterId |
| | | FROM |
| | | dj_wx_daily_plan |
| | | WHERE |
| | | IS_DELETE = 0 |
| | | and FLOW_Status = 'rjh_hz' |
| | | AND EXISTS ( |
| | | SELECT |
| | | 1 |
| | | FROM |
| | | dj_sys_role s1, |
| | | dj_sys_role_user s2 |
| | | WHERE |
| | | s1.ID = s2.role_id |
| | | AND s1.IS_DELETE=0 |
| | | AND s2.IS_DELETE=0 |
| | | AND s2.USER_id = #{userId} |
| | | AND s1.CODE = 'zcbm' |
| | | ) |
| | | GROUP BY |
| | | project_id, plan_date |
| | | ) a |
| | | left join dj_wx_project b on a.project_id = b.id |
| | | left join sys_user c on a.SUBMIT_PERSONNEL = c.user_id |
| | | </select> |
| | | |
| | | <select id="getRowByProjectId" resultType="com.zt.modules.workflow.model.WfRunTask"> |
| | | SELECT |
| | | a.id, |
| | | a.prev_id, |
| | | a.prev_step_id, |
| | | a.flow_id, |
| | | a.step_id, |
| | | a.step_name, |
| | | a.biz_id, |
| | | a.title, |
| | | a.sender_id, |
| | | a.sender_name, |
| | | a.sender_time, |
| | | a.group_id, |
| | | a.receive_id, |
| | | a.receive_name, |
| | | a.receive_time, |
| | | a.open_time, |
| | | a.finish_time, |
| | | a.finish_time2, |
| | | a.comment, |
| | | a.is_sign, |
| | | a.sort, |
| | | a.note, |
| | | a.remark, |
| | | a.is_delete, |
| | | a.dept_id, |
| | | a.company_id, |
| | | a.tenant_id, |
| | | a.topic, |
| | | a.apply_user_id, |
| | | a.apply_time, |
| | | a.apply_user, |
| | | a.step_marker, |
| | | /*--step_router,*/ |
| | | a.flow_code, |
| | | a.group_id2, |
| | | a.finish_id, |
| | | a.finish_name, |
| | | a.biz_group_id, |
| | | a.opinion, |
| | | (case when status = 1 then '被驳回' else '' end) as statusName, |
| | | DateDiff(CURRENT_DATE,a.RECEIVE_TIME) as idleDays, |
| | | a.topic AS taskName, |
| | | a.step_name as taskType, |
| | | a.biz_id as id, |
| | | 0 as Product_id, |
| | | 0 as MAINTAIN_LEVEL, |
| | | 0 as YEAR, |
| | | a.RECEIVE_TIME AS finishTime, |
| | | a.STEP_ID as APPROVE_STEP_ID, |
| | | a.STEP_MARKER, |
| | | a.FLOW_CODE, |
| | | a.APPLY_USER as taskPeople, |
| | | 2 code, |
| | | a.title as summary, |
| | | b.STEP_ROUTER, |
| | | b.STEP_ROUTER_ID |
| | | FROM DJ_WF_RUN_TASK a |
| | | left join DJ_WF_DEF_STEP b on a.step_id = b.id |
| | | WHERE a.is_delete =0 and a.status in (0,1) |
| | | and a.topic=(select model_name from dj_wx_project where id=#{projectId}) |
| | | and a.step_marker='jsfa_sc' |
| | | ORDER BY a.receive_time DESC limit 1 |
| | | </select> |
| | | |
| | | <update id="oneKeyDoneCy"> |
| | | update dj_wf_run_task |
| | | set status=20, UPDATER=#{userId}, UPDATE_DATE=CURRENT_TIMESTAMP |
| | | where STEP_MARKER in('rjh_cy','zjh_cy','yjh_cy') and status=0 and RECEIVE_ID=#{userId} |
| | | </update> |
| | | </mapper> |
| | |
| | | <div class="mod-sys__generator"> |
| | | <el-form :model="dataForm" label-width="80px" @keyup.enter.native="getDataList()"> |
| | | <el-form-item> |
| | | <el-input style="width: 30%;margin-right: 20px;" v-model="dataForm.tableName" placeholder="请输入表名" |
| | | clearable></el-input> |
| | | 选择功能表 <el-select v-model="dataForm.tableName"> |
| | | <el-option v-for="item in tableList" :key="item.tableName" :label="item.tableName" :value="item.tableName"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button @click="getTableInfo()">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | |
| | | <div v-show="dataForm.tableData.length > 0" style="height:300px;overflow-y: auto"> |
| | | <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="200px"> |
| | | <el-form-item prop="className" label="实体对象名称" style="width: 60%"> |
| | | <el-form-item prop="className" label="实体类名称" style="width: 60%"> |
| | | <el-input v-model="dataForm.className" placeholder="请输入生成的实体对象名称"></el-input> |
| | | </el-form-item> |
| | | |
| | |
| | | packName: 'com.zt.life.modules', |
| | | isPageFlag: true, |
| | | isExport: false, |
| | | tableData: [] |
| | | tableData: [], |
| | | tableList:[] |
| | | } |
| | | |
| | | } |
| | |
| | | if (res.success) { |
| | | this.modules = res.data.modules |
| | | this.eqList = res.data.eqList |
| | | this.tableList = res.data.tableList |
| | | } |
| | | }, |
| | | async getTableInfo() { |
| | |
| | | /** |
| | | * Copyright (c) 2018 人人开源 All rights reserved. |
| | | * |
| | | * <p> |
| | | * https://www.renren.io |
| | | * |
| | | * <p> |
| | | * 版权所有,侵权必究! |
| | | */ |
| | | |
| | |
| | | eqList.add(json); |
| | | } |
| | | jsonObject.put("eqList", eqList); |
| | | |
| | | DbProperties jdbc = queryJdbcProperties(); |
| | | |
| | | DataTable table = null; |
| | | Connection conn = null; |
| | | try { |
| | | // 注册数据库驱动 |
| | | Class.forName(jdbc.getDriverClass()); |
| | | Properties props = new Properties(); |
| | | props.put("remarksReporting", "true");// 为了得到说明 |
| | | props.setProperty("user", jdbc.getUserName()); |
| | | props.setProperty("password", jdbc.getPassWord()); |
| | | // 获取连接 |
| | | conn = DriverManager.getConnection(jdbc.getUrl(), props); |
| | | table = DBUtil.getTableList(conn, false); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (conn != null) { |
| | | try { |
| | | conn.close(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | jsonObject.put("tableList", table.toJSONArray()); |
| | | return Result.ok(jsonObject); |
| | | } |
| | | |
| | |
| | | } |
| | | return false; |
| | | } |
| | | public static DataTable getTableList(Connection conn, boolean closeFlag) { |
| | | try { |
| | | DatabaseMetaData dbm = conn.getMetaData(); |
| | | String currentCatalog = conn.getCatalog(); |
| | | ResultSet rs = dbm.getTables(currentCatalog, null, null, null); |
| | | DataTable dt = new DataTable(rs); |
| | | return dt; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (closeFlag && conn != null) { |
| | | try { |
| | | conn.close(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static DataTable getColumnInfo(Connection conn, String tableName, boolean closeFlag) { |
| | | try { |
| | |
| | | } |
| | | map.put("pk", pkColumn); |
| | | map.put("package", packageName); |
| | | map.put("className", className); |
| | | map.put("className", className); //实体类名字 |
| | | // private ${className}Service ${classBean}Service; |
| | | map.put("classBean", StringUtils.uncapitalize(className)); |
| | | map.put("classBean", StringUtils.uncapitalize(className)); //实体实例名字 |
| | | // model bean的名称insert(@RequestBody ${className} ${modelName}) |
| | | map.put("modelName", StringUtils.uncapitalize(className)); |
| | | map.put("modelName", StringUtils.uncapitalize(className)); //模型名字 |
| | | // @RequestMapping("/${moduleName}/${pathName}") |
| | | String moduleName = packageName.substring(packageName.lastIndexOf(".") + 1, packageName.length()); |
| | | map.put("moduleName", moduleName); |
| | | map.put("moduleName", moduleName); //模块名字 包名(相对路径) |
| | | |
| | | String pathName = StrUtil.toSymbolCase(className, '/');// 驼峰转下划线 |
| | | if (pathName.indexOf(moduleName) == 0) { |
| | | pathName = pathName.substring(moduleName.length()); |
| | |
| | | pathName = pathName.substring(1); |
| | | } |
| | | } |
| | | |
| | | map.put("importPath", tableName.replaceAll("_", "-"));// url请求的 |
| | | map.put("pathName", pathName);// url请求的 |
| | | map.put("permName", pathName.replace("/", ":"));// 权限的 |
| | |
| | | * @since ${version} ${date} |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/${moduleName}/${pathName}") |
| | | @RequestMapping("/${moduleName}/${className}/") |
| | | @Api(tags="${comments}") |
| | | public class ${className}Controller { |
| | | @Autowired |
| | |
| | | methods: { |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let res = await #[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.id}`) |
| | | let res = await #[[this.$http.get(]]#`/${moduleName}/${className}/#[[${]]#this.dataForm.id}`) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | let res = await #[[this.$http]]#[!this.dataForm.id ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm) |
| | | let res = await #[[this.$http]]#[!this.dataForm.id ? 'post' : 'put']('/${moduleName}/${className}/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | |
| | | <template> |
| | | <el-card shadow="never" class="aui-card--fill"> |
| | | <div class="mod-${moduleName}-${modelName}}"> |
| | | <zt-table-wraper query-url="/${moduleName}/${pathName}/page" delete-url="/${moduleName}/${pathName}" v-slot="{ table }"> |
| | | <zt-table-wraper query-url="/${moduleName}/${className}/page" delete-url="/${moduleName}/${className}" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | #foreach($column in $columns) |
| | | #if($column.isSelectColumn == 'true') |
| | |
| | | <zt-button type="delete" perm="${moduleName}:delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" border @selection-change="table.selectionChangeHandle"> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40"/> |
| | | #foreach($column in $columns) |
| | | #if($column.isTableColumn == 'true') |
| | |
| | | #end |
| | | #end |
| | | #end |
| | | |
| | | <zt-table-column-handle :table="table" edit-perm="${moduleName}:update" delete-perm="${moduleName}::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |