机具库存收藏修改
This commit is contained in:
parent
418a217700
commit
c9f34ad08f
|
|
@ -6,8 +6,8 @@
|
|||
<c:choose>
|
||||
<c:when test="${page.totalRecord > 0}">
|
||||
<c:forEach items="${page.results}" var="ma" varStatus="index">
|
||||
|
||||
<tr ondblclick="setChecked(${ma.id})" onclick="topage(${ma.id} , '${ma.processName}')">
|
||||
<th style="vertical-align:middle;" class="center"><label> <input type='checkbox' value='${ma.checkerId}_${ma.processName}' class="ace rowCheck" name="rowCheck" /> <span class='lbl'></span></label></th>
|
||||
<th style="vertical-align:middle;" class="center">${(page.pageNum-1)*page.pageSize+index.index+1}</th>
|
||||
<%-- <th style="vertical-align:middle;" class="center">
|
||||
${ma.unitName}
|
||||
|
|
@ -193,18 +193,9 @@
|
|||
|
||||
|
||||
</th> --%>
|
||||
<th style="vertical-align:middle;" class="center">${ma.number}</th>
|
||||
<th style="vertical-align:middle;" class="center">${ma.number}</th>
|
||||
<th style="vertical-align:middle;" class="center">${ma.creatorName}</th>
|
||||
<th style="vertical-align:middle;color:red" class="center">
|
||||
<c:choose>
|
||||
<c:when test="${page.isFinish == 0}">
|
||||
任务未完成
|
||||
</c:when>
|
||||
<%-- <c:otherwise>
|
||||
任务已完成
|
||||
</c:otherwise> --%>
|
||||
</c:choose>
|
||||
</th>
|
||||
|
||||
<%-- <th style="vertical-align:middle;" class="center"><a href='#' title='查看' onclick="edit(${ma.id} ,${ma.definitionId})" class='aBtnNoTD' ><i class='icon-zoom-in color-p bigger-140'></i></a></th>
|
||||
--%> </tr>
|
||||
</c:forEach>
|
||||
|
|
@ -221,7 +212,7 @@
|
|||
function topage(id,processName) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "http://10.1.0.142:1999/gz_car/login/userLogin",
|
||||
url: "http://127.0.0.1:21522/gz-car/login/userLogin",
|
||||
data: {
|
||||
username: uname,
|
||||
password: pwd
|
||||
|
|
@ -233,10 +224,10 @@
|
|||
localStorage.setItem("name", name);
|
||||
//window.open("http://192.168.0.14:21625/gz-gqj/index.html")
|
||||
if(processName === '派车计划'){
|
||||
window.open("http://10.1.0.142:1999/gz-car/page/car_demand_plan/child/dispatch_car_detail.html?id="+id +"&token="+data.token)
|
||||
window.open("http://localhost:63343/gz_car_ui/page/car_demand_plan/child/dispatch_car_detail.html?id="+id +"&token="+data.token)
|
||||
|
||||
}else if(processName === '用车计划'){
|
||||
window.open("http://10.1.0.142:1999/gz-car/page/car_demand_plan/child/apply_plan_detail.html?id="+id +"&token="+data.token)
|
||||
window.open("http://localhost:63343/gz_car_ui/page/car_demand_plan/child/apply_plan_detail.html?id="+id +"&token="+data.token)
|
||||
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
</select>
|
||||
<input type="text" id="keyWord" name="keyWord" placeholder="这里输入关键词" class="input-large">
|
||||
<button id='searchBtn' class="btn btn-warning btn-sm" title="过滤" type="button" onclick="getbaseList(1)"><i class="icon-search bigger-110 icon-only"></i></button>
|
||||
<button id='getSelectedBtn' class="btn btn-success btn-sm" title="过滤" type="button">批量审批</i></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' class='pageNum' name='pageNum' value='1'/>
|
||||
|
|
@ -38,15 +39,17 @@
|
|||
<table id="baseTable" class="table table-striped table-bordered table-hover" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:3%" class="center">
|
||||
<label><input type="checkbox" class="ace" id="checkAll" ><span class="lbl"></span></label>
|
||||
</th>
|
||||
<th style="width:5%" class="center hidden-480">序号</th>
|
||||
<!-- <th style="width:10%" class="center">单位名称</th>
|
||||
<th style="width:15%" class="center">工程名称</th>
|
||||
<th style="width:10%" class="center">任务单号</th> -->
|
||||
<th style="width:15%" class="center">任务名称</th>
|
||||
<th style="width:10%" class="center">创建时间</th>
|
||||
<th style="width:10%" class="center">任务单号</th>
|
||||
<th style="width:10%" class="center">创建人</th>
|
||||
<th style="width:10%" class="center">任务情况</th>
|
||||
<th style="width:25%" class="center">任务名称</th>
|
||||
<th style="width:25%" class="center">创建时间</th>
|
||||
<th style="width:25%" class="center">任务单号</th>
|
||||
<th style="width:25%" class="center">创建人</th>
|
||||
<!-- <th style="width:10%" class="center">操作</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -104,8 +107,70 @@
|
|||
getbaseList(1); // 重新请求表格数据
|
||||
}
|
||||
$(function() {
|
||||
|
||||
|
||||
// 获取所有选中的 value(你可以绑定按钮触发)
|
||||
$('#getSelectedBtn').on('click', function () {
|
||||
let selectedValues = $('.rowCheck:checked')
|
||||
.map(function () {
|
||||
return $(this).val();
|
||||
}).get(); // 转为数组
|
||||
if(selectedValues.length == 0){
|
||||
JY.Model.info("您没有选择任何内容!");
|
||||
return;
|
||||
}
|
||||
console.log("selectedValues:", selectedValues);
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: bonuspath + '/backstage/rm/taskRecord/batchApproval',
|
||||
traditional: true,
|
||||
data: { ids: selectedValues },
|
||||
success: function(data) {
|
||||
JY.Model.info("操作成功",function () {
|
||||
getbaseList(1);
|
||||
});
|
||||
|
||||
},
|
||||
error: function(xhr) {
|
||||
console.error("请求失败,状态码:", xhr.status);
|
||||
console.error("响应内容:", xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
getbaseList(1);
|
||||
|
||||
$(document).ready(function () {
|
||||
// 下拉框改变时监听
|
||||
$('#isFinish').change(function () {
|
||||
toggleButton();
|
||||
});
|
||||
|
||||
|
||||
$('.rowCheck').prop('checked', false); // 取消所有 rowCheck 的选中状态
|
||||
$('#checkAll').prop('checked', false); // 如果你还有全选框,也一并清除
|
||||
});
|
||||
// 全选逻辑
|
||||
$('#checkAll').on('click', function (e) {
|
||||
e.stopPropagation(); // ✅ 阻止冒泡
|
||||
}).on('change', function () {
|
||||
let checked = $(this).is(':checked');
|
||||
$('.rowCheck').prop('checked', checked);
|
||||
});
|
||||
|
||||
// 行内 checkbox:阻止冒泡 + 同步全选框
|
||||
$(document).on('click', '.rowCheck', function (e) {
|
||||
e.stopPropagation(); // ✅ 阻止冒泡
|
||||
});
|
||||
// 如果所有行都被勾选了,全选框也自动勾选;否则取消
|
||||
$(document).on('change', '.rowCheck', function () {
|
||||
let all = $('.rowCheck').length;
|
||||
let checked = $('.rowCheck:checked').length;
|
||||
$('#checkAll').prop('checked', all === checked);
|
||||
});
|
||||
$("#keyWord").keydown(function(e) {
|
||||
keycode = e.which || e.keyCode;
|
||||
if (keycode == 13) {
|
||||
|
|
@ -114,6 +179,16 @@
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
function toggleButton() {
|
||||
var value = $('#isFinish').val();
|
||||
if (value === '1') {
|
||||
$('#getSelectedBtn').prop('disabled', true); // 禁用按钮
|
||||
} else {
|
||||
$('#getSelectedBtn').prop('disabled', false); // 启用按钮
|
||||
}
|
||||
}
|
||||
|
||||
function search(){
|
||||
$("#search").trigger("click");
|
||||
}
|
||||
|
|
@ -136,6 +211,7 @@
|
|||
dataType:"html",
|
||||
contentType:"application/json",
|
||||
success:function(data){
|
||||
$('#checkAll').prop('checked', false); // 如果你还有全选框,也一并清除
|
||||
$("#baseTable tbody").html(data);
|
||||
JY.Model.loadingClose();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
<input type="text" id="taskName" name="taskName" class="FormElement ui-widget-content ui-corner-all">
|
||||
</td>
|
||||
<td class="CaptionTD">协议号:</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" id="agreementCode" name="agreementCode" class="FormElement ui-widget-content ui-corner-all">
|
||||
<td class="DataTD" onclick="topage()">
|
||||
<input type="text" id="agreementCode" onclick="topage()" name="agreementCode" class="FormElement ui-widget-content ui-corner-all">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
|
|
@ -49,4 +49,10 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function topage() {
|
||||
alert('1');
|
||||
window.open("http://10.1.0.142:1999/gz-car/index.html")
|
||||
}
|
||||
</script>
|
||||
|
|
@ -710,4 +710,79 @@
|
|||
wtr.DEFINITION_ID = 21 AND wtr.ID = #{id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="batchApproval" parameterType="java.util.Map">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
<choose>
|
||||
<!-- 派车计划 -->
|
||||
<when test="item.leaseName == '派车计划'">
|
||||
UPDATE car_plan_out
|
||||
SET
|
||||
<choose>
|
||||
<when test="item.operator == '57' or item.operator == '29' or item.operator == '55' or item.operator == '56' or item.operator == '67'">
|
||||
status = 1
|
||||
</when>
|
||||
<when test="item.operator == '49' or item.operator == '50'">
|
||||
status = 2
|
||||
</when>
|
||||
</choose>
|
||||
WHERE id = #{item.id}
|
||||
</when>
|
||||
|
||||
<!-- 用车计划 -->
|
||||
<when test="item.leaseName == '用车计划'">
|
||||
UPDATE car_plan_apply
|
||||
SET
|
||||
<choose>
|
||||
<when test="item.operator == '14'">
|
||||
status_type = '1'
|
||||
</when>
|
||||
<when test="item.operator == '74' or item.operator == '75'">
|
||||
status_type = '4'
|
||||
</when>
|
||||
</choose>
|
||||
WHERE id = #{item.id}
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getUpTimes" resultType="java.lang.String">
|
||||
select audit_time
|
||||
from car_plan_audit_record
|
||||
where apply_id=#{id} and audit_type=#{auditType}
|
||||
ORDER BY audit_time desc
|
||||
limit 1
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="addRecord">
|
||||
insert into car_plan_audit_record(
|
||||
apply_id, auditor,audit_time, audit_status, audit_remark,
|
||||
creator,create_time,audit_type, type, user_name,times
|
||||
)values (#{applyId},#{auditor},#{auditTime},#{auditStatus},#{auditRemark},
|
||||
#{creator},now(),#{auditType},#{type},#{userName},#{times})
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="getPlanInfo" resultType="com.bonus.rm.beans.CarNeedPlanVo">
|
||||
select dispatch_num dispatchNum,id,need_num needNum
|
||||
FROM car_plan_apply
|
||||
where id= #{pureId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCarPlanOut" resultType="com.bonus.rm.beans.CarPlanOutVo">
|
||||
select apply_id planId, dispatch_num dispatchNum,out_time outDay,status
|
||||
from car_plan_out
|
||||
where id=#{pureId}
|
||||
</select>
|
||||
|
||||
<update id="updateCarPlanInfo">
|
||||
update car_plan_apply set dispatch_num=#{dispatchNum},dispatch_day=#{dispatchDay},dispatch_status=#{status}
|
||||
where id=#{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -1,358 +1,412 @@
|
|||
<?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.bonus.wf.dao.TaskRecordDao" >
|
||||
<resultMap id="taskRecord" type="com.bonus.wf.beans.TaskRecordBean">
|
||||
<id property="id" column="id" />
|
||||
<result property="processId" column="processId"/>
|
||||
<result property="companyId" column="companyId"/>
|
||||
<result property="processName" column="processName"/>
|
||||
<result property="definitionId" column="definitionId"/>
|
||||
<result property="definitionName" column="definitionName"/>
|
||||
<result property="operationTime" column="operationTime"/>
|
||||
<result property="operationUserId" column="operationId"/>
|
||||
<result property="operationUserName" column="operationName"/>
|
||||
<result property="checkerId" column="checkerId"/>
|
||||
<result property="checkerName" column="checkerName"/>
|
||||
<result property="definitionId" column="definitionId"/>
|
||||
<result property="creatorName" column="creatorName"/>
|
||||
<result property="isExamine2" column="isExamine2"/>
|
||||
<result property="isApproval2" column="isApproval2"/>
|
||||
<result property="responer2" column="responer2"/>
|
||||
<result property="responer8" column="responer8"/>
|
||||
<result property="responer11" column="responer11"/>
|
||||
<result property="checkStatus12" column="checkStatus12"/>
|
||||
<result property="isExamine12" column="isExamine12"/>
|
||||
<result property="isApproval12" column="isApproval12"/>
|
||||
<result property="checker12" column="checker12"/>
|
||||
<result property="responer12" column="responer12"/>
|
||||
<result property="responer18" column="responer18"/>
|
||||
<result property="responer19" column="responer19"/>
|
||||
<result property="responer20" column="responer20"/>
|
||||
<result property="responer21" column="responer21"/>
|
||||
<result property="responer22" column="responer22"/>
|
||||
<result property="responer23" column="responer23"/>
|
||||
<result property="responer24" column="responer24"/>
|
||||
<result property="responer25" column="responer25"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="unitName" column="unitName"/>
|
||||
<result property="projectName" column="projectName"/>
|
||||
<result property="isFinish" column="isFinish"/>
|
||||
</resultMap>
|
||||
<mapper namespace="com.bonus.wf.dao.TaskRecordDao">
|
||||
<resultMap id="taskRecord" type="com.bonus.wf.beans.TaskRecordBean">
|
||||
<id property="id" column="id"/>
|
||||
<result property="processId" column="processId"/>
|
||||
<result property="companyId" column="companyId"/>
|
||||
<result property="processName" column="processName"/>
|
||||
<result property="definitionId" column="definitionId"/>
|
||||
<result property="definitionName" column="definitionName"/>
|
||||
<result property="operationTime" column="operationTime"/>
|
||||
<result property="operationUserId" column="operationId"/>
|
||||
<result property="operationUserName" column="operationName"/>
|
||||
<result property="checkerId" column="checkerId"/>
|
||||
<result property="checkerName" column="checkerName"/>
|
||||
<result property="definitionId" column="definitionId"/>
|
||||
<result property="creatorName" column="creatorName"/>
|
||||
<result property="isExamine2" column="isExamine2"/>
|
||||
<result property="isApproval2" column="isApproval2"/>
|
||||
<result property="responer2" column="responer2"/>
|
||||
<result property="responer8" column="responer8"/>
|
||||
<result property="responer11" column="responer11"/>
|
||||
<result property="checkStatus12" column="checkStatus12"/>
|
||||
<result property="isExamine12" column="isExamine12"/>
|
||||
<result property="isApproval12" column="isApproval12"/>
|
||||
<result property="checker12" column="checker12"/>
|
||||
<result property="responer12" column="responer12"/>
|
||||
<result property="responer18" column="responer18"/>
|
||||
<result property="responer19" column="responer19"/>
|
||||
<result property="responer20" column="responer20"/>
|
||||
<result property="responer21" column="responer21"/>
|
||||
<result property="responer22" column="responer22"/>
|
||||
<result property="responer23" column="responer23"/>
|
||||
<result property="responer24" column="responer24"/>
|
||||
<result property="responer25" column="responer25"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="unitName" column="unitName"/>
|
||||
<result property="projectName" column="projectName"/>
|
||||
<result property="isFinish" column="isFinish"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findAll" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID,wtr.DEFINITION_ID as definitionId,wtd.`NAME` as definishtionName,wtr.PROCESS_ID as processId,
|
||||
wpd.`NAME` as processName,wtr.OPERATION_USER as operationUserId,pu.`NAME` as operationUserName,
|
||||
wtr.OPERATION_TIME as operationTime,wtr.IS_FINISH as isFinish,wtr.REMARK
|
||||
FROM wf_task_record wtr,wf_task_definition wtd,wf_process_record wpr,
|
||||
wf_process_definition wpd,pm_user pu
|
||||
WHERE wtr.DEFINITION_ID = wtd.ID AND wtr.PROCESS_ID = wpr.ID
|
||||
AND wpr.PROCESS_ID = wpd.ID AND wtr.OPERATION_USER = pu.ID
|
||||
AND wtr.IS_ACTIVE = 1
|
||||
<select id="findAll" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID,
|
||||
wtr.DEFINITION_ID as definitionId,
|
||||
wtd.`NAME` as definishtionName,
|
||||
wtr.PROCESS_ID as processId,
|
||||
wpd.`NAME` as processName,
|
||||
wtr.OPERATION_USER as operationUserId,
|
||||
pu.`NAME` as operationUserName,
|
||||
wtr.OPERATION_TIME as operationTime,
|
||||
wtr.IS_FINISH as isFinish,
|
||||
wtr.REMARK
|
||||
FROM wf_task_record wtr,
|
||||
wf_task_definition wtd,
|
||||
wf_process_record wpr,
|
||||
wf_process_definition wpd,
|
||||
pm_user pu
|
||||
WHERE wtr.DEFINITION_ID = wtd.ID
|
||||
AND wtr.PROCESS_ID = wpr.ID
|
||||
AND wpr.PROCESS_ID = wpd.ID
|
||||
AND wtr.OPERATION_USER = pu.ID
|
||||
AND wtr.IS_ACTIVE = 1
|
||||
|
||||
</select>
|
||||
</select>
|
||||
|
||||
<select id="findUnFinishContent" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
(
|
||||
SELECT
|
||||
wtr.id AS id,
|
||||
CASE
|
||||
WHEN wtr.DEFINITION_ID IN (1,2,8) THEN wtr.NUMBER
|
||||
WHEN wtr.DEFINITION_ID IN (5,11) THEN wtr1.NUMBER
|
||||
END AS number,
|
||||
wpd.NAME AS processName,
|
||||
wtd.NAME AS definitionName,
|
||||
pu.NAME AS creatorName,
|
||||
DATE_FORMAT(wtr.OPERATION_TIME, '%Y-%m-%d') AS operationTime,
|
||||
wtr.DEFINITION_ID AS definitionId,
|
||||
CASE
|
||||
WHEN wtr.DEFINITION_ID = 11 THEN wtr1.IS_FINISH
|
||||
ELSE wtr.IS_FINISH
|
||||
END AS isFinish,
|
||||
'TASK' AS source
|
||||
FROM
|
||||
wf_task_record wtr
|
||||
LEFT JOIN wf_task_record wtr1 ON wtr1.ID = wtr.SUP_ID
|
||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
||||
WHERE
|
||||
wtr.DEFINITION_ID IN (1, 2, 5, 8, 11)
|
||||
AND (
|
||||
(wtr.DEFINITION_ID = 11 AND wtr1.IS_FINISH = #{param.isFinish})
|
||||
OR (wtr.DEFINITION_ID != 11 AND wtr.IS_FINISH = #{param.isFinish})
|
||||
)
|
||||
AND wtr.IS_ACTIVE = 1
|
||||
<if test="param.operationUserId != null and param.operationUserId != ''">
|
||||
AND wtr.OPERATION_USER = #{param.operationUserId}
|
||||
</if>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND (
|
||||
wpd.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
OR wtd.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
OR pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
)
|
||||
<select id="findUnFinishContent" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
(
|
||||
SELECT
|
||||
wtr.id AS id,
|
||||
wtr.id AS checkerId,
|
||||
CASE
|
||||
WHEN wtr.DEFINITION_ID IN (1,2,8) THEN wtr.NUMBER
|
||||
WHEN wtr.DEFINITION_ID IN (5,11) THEN wtr1.NUMBER
|
||||
END AS number,
|
||||
wpd.NAME AS processName,
|
||||
wtd.NAME AS definitionName,
|
||||
pu.NAME AS creatorName,
|
||||
DATE_FORMAT(wtr.OPERATION_TIME, '%Y-%m-%d') AS operationTime,
|
||||
wtr.DEFINITION_ID AS definitionId,
|
||||
CASE
|
||||
WHEN wtr.DEFINITION_ID = 11 THEN wtr1.IS_FINISH
|
||||
ELSE wtr.IS_FINISH
|
||||
END AS isFinish,
|
||||
'TASK' AS source
|
||||
FROM
|
||||
wf_task_record wtr
|
||||
LEFT JOIN wf_task_record wtr1 ON wtr1.ID = wtr.SUP_ID
|
||||
LEFT JOIN pm_user pu ON pu.id = wtr.OPERATION_USER
|
||||
LEFT JOIN wf_task_definition wtd ON wtd.ID = wtr.DEFINITION_ID
|
||||
LEFT JOIN wf_process_definition wpd ON wpd.id = wtr.PROCESS_ID
|
||||
WHERE
|
||||
wtr.DEFINITION_ID IN (1, 2, 5, 8, 11)
|
||||
AND (
|
||||
(wtr.DEFINITION_ID = 11 AND wtr1.IS_FINISH = #{param.isFinish})
|
||||
OR (wtr.DEFINITION_ID != 11 AND wtr.IS_FINISH = #{param.isFinish})
|
||||
)
|
||||
AND wtr.IS_ACTIVE = 1
|
||||
<if test="param.operationUserId != null and param.operationUserId != ''">
|
||||
AND wtr.OPERATION_USER = #{param.operationUserId}
|
||||
</if>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND (
|
||||
wpd.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
OR wtd.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
OR pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
)
|
||||
|
||||
UNION ALL
|
||||
UNION ALL
|
||||
|
||||
(
|
||||
SELECT
|
||||
cpa.id AS id,
|
||||
cpa.code AS number,
|
||||
'用车计划' AS processName,
|
||||
'用车申请' AS definitionName,
|
||||
pu.NAME AS creatorName,
|
||||
DATE_FORMAT(cpa.create_time, '%Y-%m-%d') AS operationTime,
|
||||
NULL AS definitionId,
|
||||
NULL AS isFinish,
|
||||
'PLAN' AS source
|
||||
FROM
|
||||
car_plan_apply cpa
|
||||
LEFT JOIN pm_user pu ON pu.id = cpa.creator
|
||||
WHERE
|
||||
cpa.status = '1'
|
||||
(
|
||||
SELECT
|
||||
cpa.id AS id,
|
||||
cpa.id AS checkerId,
|
||||
cpa.code AS number,
|
||||
'用车计划' AS processName,
|
||||
'用车申请' AS definitionName,
|
||||
pu.NAME AS creatorName,
|
||||
DATE_FORMAT(cpa.create_time, '%Y-%m-%d') AS operationTime,
|
||||
NULL AS definitionId,
|
||||
NULL AS isFinish,
|
||||
'PLAN' AS source
|
||||
FROM
|
||||
car_plan_apply cpa
|
||||
LEFT JOIN pm_user pu ON pu.id = cpa.creator
|
||||
WHERE
|
||||
cpa.status = '1'
|
||||
<choose>
|
||||
<when test="param.operationUserId == '14'">
|
||||
<if test="param.isFinish == 0">
|
||||
AND cpa.status_type = '4'
|
||||
</if>
|
||||
<if test="param.isFinish == 1">
|
||||
AND cpa.status_type = '1'
|
||||
</if>
|
||||
</when>
|
||||
<when test="param.operationUserId == '84' or param.operationUserId == '85'">
|
||||
<if test="param.isFinish == 0">
|
||||
AND cpa.status_type = '3'
|
||||
</if>
|
||||
<if test="param.isFinish == 1">
|
||||
AND cpa.status_type in ('4','1')
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
AND 1 = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
</if>
|
||||
)
|
||||
|
||||
<choose>
|
||||
<when test="param.operationUserId == '14'">
|
||||
AND cpa.status_type = '4'
|
||||
</when>
|
||||
<when test="param.operationUserId == '84' or param.operationUserId == '85'">
|
||||
AND cpa.status_type = '3'
|
||||
</when>
|
||||
<otherwise>
|
||||
AND 1 = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
</if>
|
||||
)
|
||||
UNION ALL
|
||||
|
||||
UNION ALL
|
||||
(
|
||||
SELECT
|
||||
cpa.id AS id,
|
||||
cpo.id AS checkerId,
|
||||
cpa.code AS number,
|
||||
'派车计划' AS processName,
|
||||
CASE cpo.type
|
||||
WHEN 1 THEN '车辆派车'
|
||||
WHEN 2 THEN '吊车派车'
|
||||
ELSE '派车'
|
||||
END AS definitionName,
|
||||
pu.NAME AS creatorName,
|
||||
DATE_FORMAT(cpo.create_time, '%Y-%m-%d') AS operationTime,
|
||||
NULL AS definitionId,
|
||||
cpo.status AS isFinish,
|
||||
'OUT' AS source
|
||||
FROM
|
||||
car_plan_out cpo
|
||||
LEFT JOIN pm_user pu ON pu.id = cpo.creator
|
||||
LEFT JOIN car_plan_apply cpa ON cpo.apply_id = cpa.id
|
||||
<where>
|
||||
<choose>
|
||||
<when test="param.operationUserId == '57' or param.operationUserId == '29' or param.operationUserId == '55' or param.operationUserId == '56' or param.operationUserId == '67'">
|
||||
<if test="param.isFinish == 0">
|
||||
AND cpo.status = 0
|
||||
</if>
|
||||
<if test="param.isFinish == 1">
|
||||
AND cpo.status in (1, 2)
|
||||
</if>
|
||||
</when>
|
||||
<when test="param.operationUserId == '49' or param.operationUserId == '50'">
|
||||
<if test="param.isFinish == 0">
|
||||
AND cpo.status = '1'
|
||||
</if>
|
||||
<if test="param.isFinish == 1">
|
||||
AND cpo.status = '2'
|
||||
</if>
|
||||
|
||||
(
|
||||
SELECT
|
||||
cpa.id AS id,
|
||||
cpa.code AS number,
|
||||
'派车计划' AS processName,
|
||||
CASE cpo.type
|
||||
WHEN 1 THEN '车辆派车'
|
||||
WHEN 2 THEN '吊车派车'
|
||||
ELSE '派车'
|
||||
END AS definitionName,
|
||||
pu.NAME AS creatorName,
|
||||
DATE_FORMAT(cpo.create_time, '%Y-%m-%d') AS operationTime,
|
||||
NULL AS definitionId,
|
||||
cpo.status AS isFinish,
|
||||
'OUT' AS source
|
||||
FROM
|
||||
car_plan_out cpo
|
||||
LEFT JOIN pm_user pu ON pu.id = cpo.creator
|
||||
LEFT JOIN car_plan_apply cpa ON cpo.apply_id = cpa.id
|
||||
<where>
|
||||
<choose>
|
||||
<when test="param.operationUserId == '57' or param.operationUserId == '29' or param.operationUserId == '55' or param.operationUserId == '56' or param.operationUserId == '67'">
|
||||
AND cpa.status_type = '0'
|
||||
</when>
|
||||
<when test="param.operationUserId == '49' or param.operationUserId == '50'">
|
||||
AND cpo.status = '1'
|
||||
</when>
|
||||
<otherwise>
|
||||
AND 1 = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</when>
|
||||
<otherwise>
|
||||
AND 1 = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND pu.NAME LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
|
||||
ORDER BY id DESC
|
||||
ORDER BY id DESC
|
||||
|
||||
|
||||
</select>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="find" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID,wtr.DEFINITION_ID as definitionId,wtd.`NAME` as definishtionName,wtr.PROCESS_ID as processId,
|
||||
wpd.`NAME` as processName,wtr.OPERATION_USER as operationUserId,pu.`NAME` as operationUserName,
|
||||
wtr.OPERATION_TIME as operationTime,wtr.IS_FINISH as isFinish,wtr.REMARK
|
||||
FROM wf_task_record wtr,wf_task_definition wtd,wf_process_record wpr,
|
||||
wf_process_definition wpd,pm_user pu
|
||||
WHERE wtr.DEFINITION_ID = wtd.ID AND wtr.PROCESS_ID = wpr.ID
|
||||
AND wpr.PROCESS_ID = wpd.ID AND wtr.OPERATION_USER = pu.ID
|
||||
AND wtr.IS_ACTIVE = 1
|
||||
where wtr.ID = #{id}
|
||||
</select>
|
||||
<select id="find" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID,
|
||||
wtr.DEFINITION_ID as definitionId,
|
||||
wtd.`NAME` as definishtionName,
|
||||
wtr.PROCESS_ID as processId,
|
||||
wpd.`NAME` as processName,
|
||||
wtr.OPERATION_USER as operationUserId,
|
||||
pu.`NAME` as operationUserName,
|
||||
wtr.OPERATION_TIME as operationTime,
|
||||
wtr.IS_FINISH as isFinish,
|
||||
wtr.REMARK
|
||||
FROM wf_task_record wtr,
|
||||
wf_task_definition wtd,
|
||||
wf_process_record wpr,
|
||||
wf_process_definition wpd,
|
||||
pm_user pu
|
||||
WHERE wtr.DEFINITION_ID = wtd.ID
|
||||
AND wtr.PROCESS_ID = wpr.ID
|
||||
AND wpr.PROCESS_ID = wpd.ID
|
||||
AND wtr.OPERATION_USER = pu.ID
|
||||
AND wtr.IS_ACTIVE = 1 where wtr.ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="findTaskInfo" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID AS taskId
|
||||
FROM wf_task_record wtr
|
||||
LEFT JOIN wf_task_record wtr1 ON wtr1.ID = wtr.SUP_ID
|
||||
LEFT JOIN wf_new_check wnc ON wnc.TASK_ID = wtr.ID
|
||||
WHERE wtr.SUP_ID = #{taskId} AND wtr.DEFINITION_ID = #{definitionId}
|
||||
</select>
|
||||
<select id="findTaskInfo" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID AS taskId
|
||||
FROM wf_task_record wtr
|
||||
LEFT JOIN wf_task_record wtr1 ON wtr1.ID = wtr.SUP_ID
|
||||
LEFT JOIN wf_new_check wnc ON wnc.TASK_ID = wtr.ID
|
||||
WHERE wtr.SUP_ID = #{taskId}
|
||||
AND wtr.DEFINITION_ID = #{definitionId}
|
||||
</select>
|
||||
|
||||
<select id="findRepairTask" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID as taskId
|
||||
FROM wf_task_record wtr
|
||||
WHERE wtr.SUP_ID = #{taskId} AND wtr.DEFINITION_ID = #{definitionId} and wtr.IS_FINISH = 0
|
||||
</select>
|
||||
<select id="findRepairTask" parameterType="com.bonus.wf.beans.TaskRecordBean" resultMap="taskRecord">
|
||||
SELECT wtr.ID as taskId
|
||||
FROM wf_task_record wtr
|
||||
WHERE wtr.SUP_ID = #{taskId}
|
||||
AND wtr.DEFINITION_ID = #{definitionId}
|
||||
and wtr.IS_FINISH = 0
|
||||
</select>
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wf_task_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="definitionId != null">
|
||||
DEFINITION_ID,
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
PROCESS_ID,
|
||||
</if>
|
||||
<if test="operationUserId != null">
|
||||
OPERATION_USER,
|
||||
</if>
|
||||
<if test="operationTime != null">
|
||||
OPERATION_TIME,
|
||||
</if>
|
||||
<if test="number != null">
|
||||
NUMBER,
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
IS_SPLIT,
|
||||
</if>
|
||||
<if test="isFinish != null">
|
||||
IS_FINISH,
|
||||
</if>
|
||||
<if test="leasePerson != null">
|
||||
LEASE_PERSON,
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
PHONE,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
REMARK,
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
SUP_ID,
|
||||
</if>
|
||||
<if test="subcontractors != null">
|
||||
SUBCONTRACTORS_ID,
|
||||
</if>
|
||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wf_task_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="definitionId != null">
|
||||
DEFINITION_ID,
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
PROCESS_ID,
|
||||
</if>
|
||||
<if test="operationUserId != null">
|
||||
OPERATION_USER,
|
||||
</if>
|
||||
<if test="operationTime != null">
|
||||
OPERATION_TIME,
|
||||
</if>
|
||||
<if test="number != null">
|
||||
NUMBER,
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
IS_SPLIT,
|
||||
</if>
|
||||
<if test="isFinish != null">
|
||||
IS_FINISH,
|
||||
</if>
|
||||
<if test="leasePerson != null">
|
||||
LEASE_PERSON,
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
PHONE,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
REMARK,
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
SUP_ID,
|
||||
</if>
|
||||
<if test="subcontractors != null">
|
||||
SUBCONTRACTORS_ID,
|
||||
</if>
|
||||
|
||||
<if test="companyId != null">
|
||||
org_id,
|
||||
</if>
|
||||
IS_ACTIVE,PLAN_OUT_ID
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="definitionId != null">
|
||||
#{definitionId},
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
#{processId},
|
||||
</if>
|
||||
<if test="operationUserId != null">
|
||||
#{operationUserId},
|
||||
</if>
|
||||
<if test="operationTime != null">
|
||||
#{operationTime},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
#{number},
|
||||
</if>
|
||||
<if test="isFinish != null">
|
||||
#{isFinish},
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
#{isSplit},
|
||||
</if>
|
||||
<if test="leasePerson != null">
|
||||
#{leasePerson},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
#{taskId},
|
||||
</if>
|
||||
<if test="subcontractors != null">
|
||||
#{subcontractors},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
org_id,
|
||||
</if>
|
||||
IS_ACTIVE,PLAN_OUT_ID
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="definitionId != null">
|
||||
#{definitionId},
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
#{processId},
|
||||
</if>
|
||||
<if test="operationUserId != null">
|
||||
#{operationUserId},
|
||||
</if>
|
||||
<if test="operationTime != null">
|
||||
#{operationTime},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
#{number},
|
||||
</if>
|
||||
<if test="isFinish != null">
|
||||
#{isFinish},
|
||||
</if>
|
||||
<if test="isSplit != null">
|
||||
#{isSplit},
|
||||
</if>
|
||||
<if test="leasePerson != null">
|
||||
#{leasePerson},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
#{phone},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
#{taskId},
|
||||
</if>
|
||||
<if test="subcontractors != null">
|
||||
#{subcontractors},
|
||||
</if>
|
||||
|
||||
<if test="companyId != null">
|
||||
#{companyId},
|
||||
</if>
|
||||
1,#{planOutId}
|
||||
</trim>
|
||||
</insert>
|
||||
<if test="companyId != null">
|
||||
#{companyId},
|
||||
</if>
|
||||
1,#{planOutId}
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="findNumber" parameterType="com.bonus.wf.beans.TaskRecordBean" resultType="java.lang.String">
|
||||
SELECT COUNT(*) FROM wf_task_record wtr
|
||||
WHERE wtr.OPERATION_TIME LIKE CONCAT("%",#{operationTime},"%")
|
||||
AND wtr.DEFINITION_ID = #{definitionId}
|
||||
</select>
|
||||
<select id="findNumber" parameterType="com.bonus.wf.beans.TaskRecordBean" resultType="java.lang.String">
|
||||
SELECT COUNT(*)
|
||||
FROM wf_task_record wtr
|
||||
WHERE wtr.OPERATION_TIME LIKE CONCAT("%", #{operationTime}, "%")
|
||||
AND wtr.DEFINITION_ID = #{definitionId}
|
||||
</select>
|
||||
|
||||
<delete id="delete" parameterType="com.bonus.wf.beans.TaskRecordBean">
|
||||
delete from wf_task_record where id = #{id}
|
||||
</delete>
|
||||
<delete id="delete" parameterType="com.bonus.wf.beans.TaskRecordBean">
|
||||
delete
|
||||
from wf_task_record
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<update id="update" parameterType="com.bonus.wf.beans.TaskRecordBean">
|
||||
update wf_task_record
|
||||
<set>
|
||||
<if test="definitionId != null">
|
||||
DEFINITION_ID = #{definitionId},
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
PROCESS_ID = #{processId},
|
||||
</if>
|
||||
<if test="operationUserId !=null">
|
||||
OPERATION_USER = #{operationUserId},
|
||||
</if>
|
||||
<if test="operationTime !=null">
|
||||
OPERATION_TIME = #{operationTime},
|
||||
</if>
|
||||
<if test="number !=null">
|
||||
NUMBER = #{number},
|
||||
</if>
|
||||
<if test="isFinish !=null">
|
||||
IS_FINISH = #{isFinish},
|
||||
</if>
|
||||
<if test="isSplit !=null">
|
||||
IS_SPLIT = #{isSplit},
|
||||
</if>
|
||||
<if test="companyId !=null">
|
||||
ORG_ID = #{companyId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
REMARK = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="update" parameterType="com.bonus.wf.beans.TaskRecordBean">
|
||||
update wf_task_record
|
||||
<set>
|
||||
<if test="definitionId != null">
|
||||
DEFINITION_ID = #{definitionId},
|
||||
</if>
|
||||
<if test="processId != null">
|
||||
PROCESS_ID = #{processId},
|
||||
</if>
|
||||
<if test="operationUserId !=null">
|
||||
OPERATION_USER = #{operationUserId},
|
||||
</if>
|
||||
<if test="operationTime !=null">
|
||||
OPERATION_TIME = #{operationTime},
|
||||
</if>
|
||||
<if test="number !=null">
|
||||
NUMBER = #{number},
|
||||
</if>
|
||||
<if test="isFinish !=null">
|
||||
IS_FINISH = #{isFinish},
|
||||
</if>
|
||||
<if test="isSplit !=null">
|
||||
IS_SPLIT = #{isSplit},
|
||||
</if>
|
||||
<if test="companyId !=null">
|
||||
ORG_ID = #{companyId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
REMARK = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<insert id="addTaskAgreement" parameterType="com.bonus.wf.beans.TaskRecordBean">
|
||||
insert into wf_agreement_task(TASK_ID,AGREEMENT_ID)
|
||||
values(#{taskId},#{agreementId})
|
||||
</insert>
|
||||
<insert id="addTaskAgreement" parameterType="com.bonus.wf.beans.TaskRecordBean">
|
||||
insert into wf_agreement_task(TASK_ID, AGREEMENT_ID)
|
||||
values (#{taskId}, #{agreementId})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteBatch" parameterType="java.util.List">
|
||||
DELETE FROM wf_process_record WHERE id in(
|
||||
<foreach item="o" collection="list" open="" separator=","
|
||||
close="">
|
||||
#{o.id}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
<delete id="deleteBatch" parameterType="java.util.List">
|
||||
DELETE FROM wf_process_record WHERE id in(
|
||||
<foreach item="o" collection="list" open="" separator=","
|
||||
close="">
|
||||
#{o.id}
|
||||
</foreach>
|
||||
)
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="checkTask" parameterType="java.lang.String" resultMap="taskRecord">
|
||||
SELECT wtr.ID AS taskId,number
|
||||
FROM wf_task_record wtr
|
||||
WHERE wtr.SUP_ID = #{taskId} AND wtr.DEFINITION_ID = 20 AND wtr.IS_SPLIT = 0
|
||||
</select>
|
||||
<select id="checkTask" parameterType="java.lang.String" resultMap="taskRecord">
|
||||
SELECT wtr.ID AS taskId, number
|
||||
FROM wf_task_record wtr
|
||||
WHERE wtr.SUP_ID = #{taskId}
|
||||
AND wtr.DEFINITION_ID = 20
|
||||
AND wtr.IS_SPLIT = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -492,4 +492,33 @@ public class DateTimeHelper {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public static String getNowDay() {
|
||||
String time = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
public static String getTimeDiff(String endTime,String nowTime) {
|
||||
Long[] dateArr = new Long[2];
|
||||
try {
|
||||
String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS);
|
||||
Date date = sdf.parse(endTime);
|
||||
Date time = sdf.parse(nowTime);
|
||||
long nd = 1000 * 24 * 60 * 60;
|
||||
long nh = 1000 * 60 * 60;
|
||||
long nm = 1000 * 60;
|
||||
long diff = date.getTime() - time.getTime();
|
||||
long hour = diff/ nh;
|
||||
long min = diff % nh / nm;
|
||||
// dateArr[0] = hour;
|
||||
// dateArr[1] = min == 0 ? 1 : min;
|
||||
return hour+ "小时" + min + "分钟";
|
||||
} catch (Exception e) {
|
||||
dateArr[0] = 0L;
|
||||
dateArr[1] = 0L;
|
||||
}
|
||||
return 0 + "小时" + 0 + "分钟";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,160 @@
|
|||
package com.bonus.rm.beans;
|
||||
|
||||
public class AuditRecordVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 计划
|
||||
*/
|
||||
private String applyId;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String auditor;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private String auditTime;
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String auditRemark;
|
||||
/**
|
||||
* 审核节点
|
||||
*/
|
||||
private String auditType;
|
||||
/**
|
||||
* 操作类型 1 创建 2 提交 3审核 4 修改
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 操作人名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 操作人昵称
|
||||
*/
|
||||
private String nikeName;
|
||||
|
||||
|
||||
|
||||
private String times;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String creator;
|
||||
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getApplyId() {
|
||||
return applyId;
|
||||
}
|
||||
|
||||
public void setApplyId(String applyId) {
|
||||
this.applyId = applyId;
|
||||
}
|
||||
|
||||
public String getAuditor() {
|
||||
return auditor;
|
||||
}
|
||||
|
||||
public void setAuditor(String auditor) {
|
||||
this.auditor = auditor;
|
||||
}
|
||||
|
||||
public String getAuditTime() {
|
||||
return auditTime;
|
||||
}
|
||||
|
||||
public void setAuditTime(String auditTime) {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
public String getAuditStatus() {
|
||||
return auditStatus;
|
||||
}
|
||||
|
||||
public void setAuditStatus(String auditStatus) {
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
public String getAuditRemark() {
|
||||
return auditRemark;
|
||||
}
|
||||
|
||||
public void setAuditRemark(String auditRemark) {
|
||||
this.auditRemark = auditRemark;
|
||||
}
|
||||
|
||||
public String getAuditType() {
|
||||
return auditType;
|
||||
}
|
||||
|
||||
public void setAuditType(String auditType) {
|
||||
this.auditType = auditType;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getNikeName() {
|
||||
return nikeName;
|
||||
}
|
||||
|
||||
public void setNikeName(String nikeName) {
|
||||
this.nikeName = nikeName;
|
||||
}
|
||||
|
||||
public String getTimes() {
|
||||
return times;
|
||||
}
|
||||
|
||||
public void setTimes(String times) {
|
||||
this.times = times;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,526 @@
|
|||
package com.bonus.rm.beans;
|
||||
|
||||
public class CarNeedPlanVo {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
private String contractId;
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 类型 1车辆 2吊车
|
||||
*/
|
||||
private int type;
|
||||
|
||||
private String typeName;
|
||||
/**
|
||||
* 申请人
|
||||
*/
|
||||
|
||||
private String userName;
|
||||
|
||||
|
||||
private String appLyTime;
|
||||
/**
|
||||
* 工程id
|
||||
*/
|
||||
private String proId;
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 工程类型
|
||||
*/
|
||||
private String proType;
|
||||
|
||||
/**
|
||||
* 项目部分
|
||||
*/
|
||||
private String projectPart;
|
||||
/**
|
||||
* 施工地点
|
||||
*/
|
||||
// @NotBlank(message = "请填施工地点")
|
||||
private String projectContent;
|
||||
/**
|
||||
* 需用时间
|
||||
*/
|
||||
|
||||
private String needTime;
|
||||
/**
|
||||
* 审核状态中文
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 派车状态
|
||||
*/
|
||||
private String statusName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 计划类型 0 正常 1紧急
|
||||
*/
|
||||
private String applyType;
|
||||
/**
|
||||
* 审核状态 1 待审核 2审核通过 3 审核驳回
|
||||
*/
|
||||
private int status;
|
||||
/**
|
||||
* 审核节点
|
||||
*/
|
||||
private int statusType;
|
||||
|
||||
/**
|
||||
* 计划数量
|
||||
*/
|
||||
private int carNum;
|
||||
/**
|
||||
* 用车数量
|
||||
*/
|
||||
private int needNum;
|
||||
/**
|
||||
* 已派车数量
|
||||
*/
|
||||
private int dispatchNum;
|
||||
/**
|
||||
* 待派车数量
|
||||
*/
|
||||
private int noDispatchNum;
|
||||
|
||||
/**
|
||||
* 删除的类型id
|
||||
*/
|
||||
private String delIds;
|
||||
|
||||
|
||||
private String model;
|
||||
|
||||
private String name;
|
||||
|
||||
private String supId;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supName;
|
||||
/**
|
||||
* 发货日期
|
||||
*/
|
||||
private String dispatchDay;
|
||||
/**
|
||||
* 是否发车
|
||||
*/
|
||||
private String isDispatch;
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
private String roleCode;
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
private String planId;
|
||||
/**
|
||||
* 派车时间
|
||||
*/
|
||||
private String outTime;
|
||||
|
||||
private String carLength;
|
||||
private String carWidth;
|
||||
private String carHeight;
|
||||
private String carWeight;
|
||||
private String carStart;
|
||||
private String carEnd;
|
||||
|
||||
private String routePoint;
|
||||
|
||||
|
||||
private int fileNum;
|
||||
|
||||
/**
|
||||
* 删除的文件
|
||||
*/
|
||||
private String delFile;
|
||||
|
||||
private String outId;
|
||||
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String licensePlate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(String contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getAppLyTime() {
|
||||
return appLyTime;
|
||||
}
|
||||
|
||||
public void setAppLyTime(String appLyTime) {
|
||||
this.appLyTime = appLyTime;
|
||||
}
|
||||
|
||||
public String getProId() {
|
||||
return proId;
|
||||
}
|
||||
|
||||
public void setProId(String proId) {
|
||||
this.proId = proId;
|
||||
}
|
||||
|
||||
public String getProName() {
|
||||
return proName;
|
||||
}
|
||||
|
||||
public void setProName(String proName) {
|
||||
this.proName = proName;
|
||||
}
|
||||
|
||||
public String getProType() {
|
||||
return proType;
|
||||
}
|
||||
|
||||
public void setProType(String proType) {
|
||||
this.proType = proType;
|
||||
}
|
||||
|
||||
public String getProjectPart() {
|
||||
return projectPart;
|
||||
}
|
||||
|
||||
public void setProjectPart(String projectPart) {
|
||||
this.projectPart = projectPart;
|
||||
}
|
||||
|
||||
public String getProjectContent() {
|
||||
return projectContent;
|
||||
}
|
||||
|
||||
public void setProjectContent(String projectContent) {
|
||||
this.projectContent = projectContent;
|
||||
}
|
||||
|
||||
public String getNeedTime() {
|
||||
return needTime;
|
||||
}
|
||||
|
||||
public void setNeedTime(String needTime) {
|
||||
this.needTime = needTime;
|
||||
}
|
||||
|
||||
public String getAuditStatus() {
|
||||
return auditStatus;
|
||||
}
|
||||
|
||||
public void setAuditStatus(String auditStatus) {
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
public String getStatusName() {
|
||||
return statusName;
|
||||
}
|
||||
|
||||
public void setStatusName(String statusName) {
|
||||
this.statusName = statusName;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getApplyType() {
|
||||
return applyType;
|
||||
}
|
||||
|
||||
public void setApplyType(String applyType) {
|
||||
this.applyType = applyType;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getStatusType() {
|
||||
return statusType;
|
||||
}
|
||||
|
||||
public void setStatusType(int statusType) {
|
||||
this.statusType = statusType;
|
||||
}
|
||||
|
||||
public int getCarNum() {
|
||||
return carNum;
|
||||
}
|
||||
|
||||
public void setCarNum(int carNum) {
|
||||
this.carNum = carNum;
|
||||
}
|
||||
|
||||
public int getNeedNum() {
|
||||
return needNum;
|
||||
}
|
||||
|
||||
public void setNeedNum(int needNum) {
|
||||
this.needNum = needNum;
|
||||
}
|
||||
|
||||
public int getDispatchNum() {
|
||||
return dispatchNum;
|
||||
}
|
||||
|
||||
public void setDispatchNum(int dispatchNum) {
|
||||
this.dispatchNum = dispatchNum;
|
||||
}
|
||||
|
||||
public int getNoDispatchNum() {
|
||||
return noDispatchNum;
|
||||
}
|
||||
|
||||
public void setNoDispatchNum(int noDispatchNum) {
|
||||
this.noDispatchNum = noDispatchNum;
|
||||
}
|
||||
|
||||
public String getDelIds() {
|
||||
return delIds;
|
||||
}
|
||||
|
||||
public void setDelIds(String delIds) {
|
||||
this.delIds = delIds;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSupId() {
|
||||
return supId;
|
||||
}
|
||||
|
||||
public void setSupId(String supId) {
|
||||
this.supId = supId;
|
||||
}
|
||||
|
||||
public String getSupName() {
|
||||
return supName;
|
||||
}
|
||||
|
||||
public void setSupName(String supName) {
|
||||
this.supName = supName;
|
||||
}
|
||||
|
||||
public String getDispatchDay() {
|
||||
return dispatchDay;
|
||||
}
|
||||
|
||||
public void setDispatchDay(String dispatchDay) {
|
||||
this.dispatchDay = dispatchDay;
|
||||
}
|
||||
|
||||
public String getIsDispatch() {
|
||||
return isDispatch;
|
||||
}
|
||||
|
||||
public void setIsDispatch(String isDispatch) {
|
||||
this.isDispatch = isDispatch;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getRoleCode() {
|
||||
return roleCode;
|
||||
}
|
||||
|
||||
public void setRoleCode(String roleCode) {
|
||||
this.roleCode = roleCode;
|
||||
}
|
||||
|
||||
public String getPlanId() {
|
||||
return planId;
|
||||
}
|
||||
|
||||
public void setPlanId(String planId) {
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public String getOutTime() {
|
||||
return outTime;
|
||||
}
|
||||
|
||||
public void setOutTime(String outTime) {
|
||||
this.outTime = outTime;
|
||||
}
|
||||
|
||||
public String getCarLength() {
|
||||
return carLength;
|
||||
}
|
||||
|
||||
public void setCarLength(String carLength) {
|
||||
this.carLength = carLength;
|
||||
}
|
||||
|
||||
public String getCarWidth() {
|
||||
return carWidth;
|
||||
}
|
||||
|
||||
public void setCarWidth(String carWidth) {
|
||||
this.carWidth = carWidth;
|
||||
}
|
||||
|
||||
public String getCarHeight() {
|
||||
return carHeight;
|
||||
}
|
||||
|
||||
public void setCarHeight(String carHeight) {
|
||||
this.carHeight = carHeight;
|
||||
}
|
||||
|
||||
public String getCarWeight() {
|
||||
return carWeight;
|
||||
}
|
||||
|
||||
public void setCarWeight(String carWeight) {
|
||||
this.carWeight = carWeight;
|
||||
}
|
||||
|
||||
public String getCarStart() {
|
||||
return carStart;
|
||||
}
|
||||
|
||||
public void setCarStart(String carStart) {
|
||||
this.carStart = carStart;
|
||||
}
|
||||
|
||||
public String getCarEnd() {
|
||||
return carEnd;
|
||||
}
|
||||
|
||||
public void setCarEnd(String carEnd) {
|
||||
this.carEnd = carEnd;
|
||||
}
|
||||
|
||||
public String getRoutePoint() {
|
||||
return routePoint;
|
||||
}
|
||||
|
||||
public void setRoutePoint(String routePoint) {
|
||||
this.routePoint = routePoint;
|
||||
}
|
||||
|
||||
public int getFileNum() {
|
||||
return fileNum;
|
||||
}
|
||||
|
||||
public void setFileNum(int fileNum) {
|
||||
this.fileNum = fileNum;
|
||||
}
|
||||
|
||||
public String getDelFile() {
|
||||
return delFile;
|
||||
}
|
||||
|
||||
public void setDelFile(String delFile) {
|
||||
this.delFile = delFile;
|
||||
}
|
||||
|
||||
public String getOutId() {
|
||||
return outId;
|
||||
}
|
||||
|
||||
public void setOutId(String outId) {
|
||||
this.outId = outId;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
package com.bonus.rm.beans;
|
||||
|
||||
public class CarPlanOutVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
|
||||
private String outId;
|
||||
/**
|
||||
* 计划id
|
||||
*/
|
||||
private String planId;
|
||||
/**
|
||||
* 计划类型 1车辆 2 吊车
|
||||
*/
|
||||
private int planType;
|
||||
/**
|
||||
* 派车日期
|
||||
*/
|
||||
private String outDay;
|
||||
/**
|
||||
* 经办人
|
||||
*/
|
||||
private String manager;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 派车数量
|
||||
*/
|
||||
private int dispatchNum;
|
||||
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
private String contractId;
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private String supId;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supName;
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private String money;
|
||||
|
||||
|
||||
|
||||
private String delFileId;
|
||||
|
||||
private String updateRemark;
|
||||
|
||||
private String resource;
|
||||
|
||||
private String file;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOutId() {
|
||||
return outId;
|
||||
}
|
||||
|
||||
public void setOutId(String outId) {
|
||||
this.outId = outId;
|
||||
}
|
||||
|
||||
public String getPlanId() {
|
||||
return planId;
|
||||
}
|
||||
|
||||
public void setPlanId(String planId) {
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public int getPlanType() {
|
||||
return planType;
|
||||
}
|
||||
|
||||
public void setPlanType(int planType) {
|
||||
this.planType = planType;
|
||||
}
|
||||
|
||||
public String getOutDay() {
|
||||
return outDay;
|
||||
}
|
||||
|
||||
public void setOutDay(String outDay) {
|
||||
this.outDay = outDay;
|
||||
}
|
||||
|
||||
public String getManager() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void setManager(String manager) {
|
||||
this.manager = manager;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getDispatchNum() {
|
||||
return dispatchNum;
|
||||
}
|
||||
|
||||
public void setDispatchNum(int dispatchNum) {
|
||||
this.dispatchNum = dispatchNum;
|
||||
}
|
||||
|
||||
public String getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(String contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
|
||||
public String getSupId() {
|
||||
return supId;
|
||||
}
|
||||
|
||||
public void setSupId(String supId) {
|
||||
this.supId = supId;
|
||||
}
|
||||
|
||||
public String getSupName() {
|
||||
return supName;
|
||||
}
|
||||
|
||||
public void setSupName(String supName) {
|
||||
this.supName = supName;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(String money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getDelFileId() {
|
||||
return delFileId;
|
||||
}
|
||||
|
||||
public void setDelFileId(String delFileId) {
|
||||
this.delFileId = delFileId;
|
||||
}
|
||||
|
||||
public String getUpdateRemark() {
|
||||
return updateRemark;
|
||||
}
|
||||
|
||||
public void setUpdateRemark(String updateRemark) {
|
||||
this.updateRemark = updateRemark;
|
||||
}
|
||||
|
||||
public String getResource() {
|
||||
return resource;
|
||||
}
|
||||
|
||||
public void setResource(String resource) {
|
||||
this.resource = resource;
|
||||
}
|
||||
|
||||
public String getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public void setFile(String file) {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -7,7 +7,8 @@ import java.util.HashMap;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
|
@ -17,10 +18,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.bonus.exp.POIOutputHelper;
|
||||
import com.bonus.rm.beans.ReturnMaterialTaskRecordBean;
|
||||
|
|
@ -146,6 +144,21 @@ public class ReturnMaterialTaskRecordController extends BaseController<ReturnMat
|
|||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "batchApproval", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes batchApproval(@RequestParam("ids") List<String> ids) {
|
||||
System.out.println("接收到的ids:" + ids);
|
||||
AjaxRes ar = getAjaxRes();
|
||||
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
ar.setFailMsg("未接收到ids参数");
|
||||
} else {
|
||||
service.batchApproval(ids);
|
||||
ar.setSucceedMsg("接收到" + ids.size() + "个ID");
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
// 待办详情
|
||||
@RequestMapping(value = "findUnFinishContentDetails", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ package com.bonus.rm.dao;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.bonus.core.BonusBatis;
|
||||
import com.bonus.rm.beans.AuditRecordVo;
|
||||
import com.bonus.rm.beans.CarNeedPlanVo;
|
||||
import com.bonus.rm.beans.CarPlanOutVo;
|
||||
import com.bonus.rm.beans.ReturnMaterialTaskRecordBean;
|
||||
import com.bonus.sys.BaseDao;
|
||||
|
||||
|
|
@ -19,4 +25,17 @@ public interface ReturnMaterialTaskRecordDao extends BaseDao<ReturnMaterialTaskR
|
|||
int updateRemarkMachinebyId(ReturnMaterialTaskRecordBean o);
|
||||
|
||||
List<ReturnMaterialTaskRecordBean> findUnFinishContentDetails(ReturnMaterialTaskRecordBean o);
|
||||
|
||||
int batchApproval(List<ReturnMaterialTaskRecordBean> list);
|
||||
|
||||
int addRecord(AuditRecordVo vo);
|
||||
|
||||
String getUpTimes(@Param("id") String id,@Param("auditType") int statusType);
|
||||
|
||||
CarNeedPlanVo getPlanInfo(@Param("pureId") String pureId);
|
||||
|
||||
CarPlanOutVo getCarPlanOut( @Param("pureId") String pureId);
|
||||
|
||||
void updateCarPlanInfo(CarNeedPlanVo carNeedPlanVo);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.rm.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.sys.AjaxRes;
|
||||
import com.bonus.rm.beans.ReturnMaterialTaskRecordBean;
|
||||
import com.bonus.sys.BaseService;
|
||||
import com.bonus.sys.Page;
|
||||
|
|
@ -20,4 +20,7 @@ public interface ReturnMaterialTaskRecordService extends BaseService<ReturnMater
|
|||
int updateRemarkMachinebyId(ReturnMaterialTaskRecordBean o);
|
||||
|
||||
List<ReturnMaterialTaskRecordBean> findUnFinishContentDetails(ReturnMaterialTaskRecordBean o);
|
||||
|
||||
AjaxRes batchApproval(List<String> ids);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
package com.bonus.rm.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.bonus.sys.AjaxRes;
|
||||
import com.bonus.sys.UserShiroHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -11,6 +15,11 @@ import com.bonus.sys.BaseServiceImp;
|
|||
import com.bonus.sys.Page;
|
||||
import com.bonus.wf.beans.TaskRecordBean;
|
||||
import com.bonus.wf.dao.TaskRecordDao;
|
||||
import com.bonus.core.DateTimeHelper;
|
||||
import com.bonus.core.StringHelper;
|
||||
import com.bonus.rm.beans.AuditRecordVo;
|
||||
import com.bonus.rm.beans.CarNeedPlanVo;
|
||||
import com.bonus.rm.beans.CarPlanOutVo;
|
||||
|
||||
@Service("returnTaskRecord")
|
||||
public class ReturnMaterialTaskRecordServiceImp extends BaseServiceImp<ReturnMaterialTaskRecordBean>
|
||||
|
|
@ -58,4 +67,154 @@ public class ReturnMaterialTaskRecordServiceImp extends BaseServiceImp<ReturnMat
|
|||
return dao.findUnFinishContentDetails(o);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxRes batchApproval(List<String> ids) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
// 拆分出纯数字ID列表
|
||||
List<ReturnMaterialTaskRecordBean> list = ids.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(id -> {
|
||||
int index = id.indexOf('_');
|
||||
String pureId = index == -1 ? id : id.substring(0, index);
|
||||
String desc = index == -1 ? "" : id.substring(index + 1);
|
||||
String userId = UserShiroHelper.getCurrentUser().getId() + "";
|
||||
ReturnMaterialTaskRecordBean bean = new ReturnMaterialTaskRecordBean();
|
||||
|
||||
if ("派车计划".equals(desc)) {
|
||||
|
||||
CarPlanOutVo vo = dao.getCarPlanOut(pureId); // 当前记录
|
||||
CarNeedPlanVo carNeedPlanVo = dao.getPlanInfo(vo.getPlanId());
|
||||
|
||||
int statusType = 0;
|
||||
String currentStatus ="";
|
||||
if ("57".equals(userId) || "29".equals(userId) || "55".equals(userId)
|
||||
|| "56".equals(userId) || "67".equals(userId)) {
|
||||
statusType = 1;
|
||||
currentStatus = "3";
|
||||
carNeedPlanVo.setStatus(0);
|
||||
} else if ("49".equals(userId) || "50".equals(userId)) {
|
||||
int dispatchNum = carNeedPlanVo.getDispatchNum();
|
||||
carNeedPlanVo.setDispatchDay(DateTimeHelper.getNowDay());
|
||||
carNeedPlanVo.setDispatchNum(dispatchNum + vo.getDispatchNum());
|
||||
// 如果没有其他待审核记录,状态置为1(完成调度),否则2(继续审核)
|
||||
carNeedPlanVo.setStatus(2);
|
||||
// 更新计划信息
|
||||
|
||||
statusType = 2;
|
||||
currentStatus = "3";
|
||||
}
|
||||
|
||||
dao.updateCarPlanInfo(carNeedPlanVo);
|
||||
// 写操作记录
|
||||
String uptime = getUpTimes("out-" + pureId, statusType);
|
||||
addRecord("out-" + pureId, String.valueOf(statusType), "2", "3", uptime);
|
||||
|
||||
}
|
||||
|
||||
if ("用车计划".equals(desc)) {
|
||||
int statusType = 0;
|
||||
if ("14".equals(userId)) {
|
||||
statusType = 4;
|
||||
} else if ("84".equals(userId) || "85".equals(userId)) {
|
||||
statusType = 3;
|
||||
}
|
||||
String upTimes = getUpTimes(pureId, statusType, 2);
|
||||
addRecord(pureId, "2",String.valueOf(statusType) , "3" ,upTimes);
|
||||
|
||||
|
||||
}
|
||||
bean.setId(pureId); // 假设id字段是String类型,或者你要转换成Long再赋值
|
||||
bean.setLeaseName(desc);
|
||||
bean.setOperator(userId);
|
||||
// 如果有其它字段,根据需要设置
|
||||
return bean;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
int num = dao.batchApproval(list);
|
||||
|
||||
if (num > 0) {
|
||||
ar.setSucceedMsg("审批成功");
|
||||
} else {
|
||||
ar.setFailMsg("审批失败");
|
||||
}
|
||||
return ar;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
ar.setFailMsg("审批失败");
|
||||
|
||||
}
|
||||
return ar;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加记录数据
|
||||
* @param applyId 审计id
|
||||
* @param auditStatus 深恶黑状态
|
||||
* @param auditType 审核节点
|
||||
* @param type 类型
|
||||
* @return
|
||||
*/
|
||||
public int addRecord(String applyId,String auditStatus,String auditType,String type,String times){
|
||||
try {
|
||||
AuditRecordVo vo=new AuditRecordVo();
|
||||
if(StringHelper.isNotEmpty(times)){
|
||||
String time = DateTimeHelper.getTimeDiff(DateTimeHelper.getNowTime(),times);
|
||||
vo.setTimes(time);
|
||||
}
|
||||
String userId= Objects.requireNonNull(UserShiroHelper.getCurrentUser().getId()).toString();
|
||||
String userName= UserShiroHelper.getCurrentUser().getName();
|
||||
vo.setApplyId(applyId);
|
||||
vo.setCreator(userId);
|
||||
vo.setAuditTime(DateTimeHelper.getNowTime());
|
||||
vo.setAuditStatus(auditStatus);
|
||||
vo.setAuditType(auditType);
|
||||
vo.setType(type);
|
||||
vo.setAuditRemark("审核通过");
|
||||
vo.setUserName(userName);
|
||||
vo.setAuditor(userId);
|
||||
return dao.addRecord(vo);
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询上个节点时间
|
||||
* @param id
|
||||
* @param statusType
|
||||
* @return
|
||||
*/
|
||||
public String getUpTimes(String id, int statusType,int status) {
|
||||
if(status==2){
|
||||
statusType=statusType-1;
|
||||
if(statusType==3){
|
||||
return dao.getUpTimes(id,1);
|
||||
}else{
|
||||
return dao.getUpTimes(id,statusType);
|
||||
}
|
||||
}else{
|
||||
return dao.getUpTimes(id,1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String getUpTimes(String id,int status) {
|
||||
//发车审核
|
||||
if(status==3){
|
||||
status=2;
|
||||
return dao.getUpTimes(id,status);
|
||||
}else{
|
||||
return dao.getUpTimes(id,1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue