新购模块优化tm_task去除status
This commit is contained in:
parent
b5fdfb50a9
commit
a8956fa0f8
|
|
@ -116,7 +116,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
String taskCode = genderTaskCode(thisMonthMaxOrder);
|
String taskCode = genderTaskCode(thisMonthMaxOrder);
|
||||||
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId(),
|
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId(),
|
||||||
LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(),
|
LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(),
|
||||||
leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(), "1", thisMonthMaxOrder + 1, taskCode);
|
leaseApplyRequestVo.getLeaseApplyInfo().getCompanyId(),thisMonthMaxOrder + 1, taskCode);
|
||||||
tmTask.setCreateTime(DateUtils.getNowDate());
|
tmTask.setCreateTime(DateUtils.getNowDate());
|
||||||
tmTask.setCreateBy(SecurityUtils.getUsername());
|
tmTask.setCreateBy(SecurityUtils.getUsername());
|
||||||
tmTaskMapper.insertTmTask(tmTask);
|
tmTaskMapper.insertTmTask(tmTask);
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
String taskCode = genderTaskCode(thisMonthMaxOrder);
|
String taskCode = genderTaskCode(thisMonthMaxOrder);
|
||||||
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_PURCHASE.getTaskTypeId(),
|
TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_PURCHASE.getTaskTypeId(),
|
||||||
PurchaseTaskStatusEnum.TASK_TO_START.getStatus(),
|
PurchaseTaskStatusEnum.TASK_TO_START.getStatus(),
|
||||||
purchaseCheckInfo.getPurchaseCheckInfo().getCompanyId(), "1", thisMonthMaxOrder + 1, taskCode);
|
purchaseCheckInfo.getPurchaseCheckInfo().getCompanyId(), thisMonthMaxOrder + 1, taskCode);
|
||||||
tmTask.setCreateTime(DateUtils.getNowDate());
|
tmTask.setCreateTime(DateUtils.getNowDate());
|
||||||
tmTaskMapper.insertTmTask(tmTask);
|
tmTaskMapper.insertTmTask(tmTask);
|
||||||
Long taskId = tmTask.getTaskId();
|
Long taskId = tmTask.getTaskId();
|
||||||
|
|
|
||||||
|
|
@ -46,20 +46,14 @@ public class TmTask extends BaseEntity {
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
@ApiModelProperty(value = "数据所属组织")
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
/** 0不启用 1启用 */
|
|
||||||
@Excel(name = "0不启用 1启用")
|
|
||||||
@ApiModelProperty(value = "0不启用 1启用")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "任务当月序号 例如:1 插入及查询时请携带任务类型")
|
@ApiModelProperty(value = "任务当月序号 例如:1 插入及查询时请携带任务类型")
|
||||||
private Integer monthOrder;
|
private Integer monthOrder;
|
||||||
|
|
||||||
public TmTask(Long taskId, Integer taskType, Integer taskStatus, Long companyId, String status, Integer monthOrder, String code) {
|
public TmTask(Long taskId, Integer taskType, Integer taskStatus, Long companyId, Integer monthOrder, String code) {
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
this.taskType = taskType;
|
this.taskType = taskType;
|
||||||
this.taskStatus = taskStatus;
|
this.taskStatus = taskStatus;
|
||||||
this.companyId = companyId;
|
this.companyId = companyId;
|
||||||
this.status = status;
|
|
||||||
this.monthOrder = monthOrder;
|
this.monthOrder = monthOrder;
|
||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
FROM
|
FROM
|
||||||
back_apply_info bai
|
back_apply_info bai
|
||||||
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
||||||
LEFT JOIN tm_task tt on tt.task_id = bai.task_id and tt.status = '1'
|
LEFT JOIN tm_task tt on tt.task_id = bai.task_id
|
||||||
LEFT JOIN tm_task_agreement tta on tta.task_id = tt.task_id
|
LEFT JOIN tm_task_agreement tta on tta.task_id = tt.task_id
|
||||||
LEFT JOIN bm_agreement_info bagi on bagi.agreement_id = tta.agreement_id
|
LEFT JOIN bm_agreement_info bagi on bagi.agreement_id = tta.agreement_id
|
||||||
AND bagi.`status` = '1'
|
AND bagi.`status` = '1'
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="companyId" column="company_id" />
|
<result property="companyId" column="company_id" />
|
||||||
<result property="status" column="status" />
|
|
||||||
<result property="monthOrder" column="month_order" />
|
<result property="monthOrder" column="month_order" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectTmTaskVo">
|
<sql id="selectTmTaskVo">
|
||||||
select task_id, task_type, task_status, code, create_by, create_time,
|
select task_id, task_type, task_status, code, create_by, create_time,
|
||||||
update_by, update_time, remark, company_id, status, month_order
|
update_by, update_time, remark, company_id, month_order
|
||||||
from tm_task
|
from tm_task
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -33,7 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||||
<if test="monthOrder != null and code != ''"> and month_order = #{monthOrder}</if>
|
<if test="monthOrder != null and code != ''"> and month_order = #{monthOrder}</if>
|
||||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -55,7 +53,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="companyId != null">company_id,</if>
|
<if test="companyId != null">company_id,</if>
|
||||||
<if test="status != null">`status`,</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="taskType != null">#{taskType},</if>
|
<if test="taskType != null">#{taskType},</if>
|
||||||
|
|
@ -68,7 +65,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="companyId != null">#{companyId},</if>
|
<if test="companyId != null">#{companyId},</if>
|
||||||
<if test="status != null">#{status},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -85,7 +81,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="companyId != null">company_id = #{companyId},</if>
|
<if test="companyId != null">company_id = #{companyId},</if>
|
||||||
<if test="status != null">`status` = #{status},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -137,120 +132,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ORDER BY create_time DESC LIMIT 1
|
ORDER BY create_time DESC LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- <select id="getAuditListByLeaseTmTask" resultType="com.bonus.material.task.domain.vo.TmTaskRequestVo">-->
|
|
||||||
<!-- SELECT DISTINCT-->
|
|
||||||
<!-- tt.task_id as taskId, tt.task_type as taskType, tt.task_status as taskStatus, tt.status, tt.code,-->
|
|
||||||
<!-- su.phonenumber AS phoneNumber, sd.dept_name as deptName,-->
|
|
||||||
<!-- bpl.pro_id as proId,bpl.pro_name as projectName,-->
|
|
||||||
<!-- bui.unit_id as unitId,bui.unit_name as unitName,-->
|
|
||||||
<!-- lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,-->
|
|
||||||
<!-- lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime,-->
|
|
||||||
<!-- bai.agreement_code as agreementCode,-->
|
|
||||||
<!-- tt.create_time as createTimes, tt.update_time as updateTimes-->
|
|
||||||
<!-- FROM-->
|
|
||||||
<!-- tm_task tt-->
|
|
||||||
<!-- LEFT JOIN sys_user su ON tt.create_by = su.user_name-->
|
|
||||||
<!-- LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id-->
|
|
||||||
<!-- LEFT JOIN tm_task_agreement tta ON tt.task_id = tta.task_id-->
|
|
||||||
<!-- LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id-->
|
|
||||||
<!-- LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id-->
|
|
||||||
<!-- LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id-->
|
|
||||||
<!-- LEFT JOIN lease_apply_info lai ON lai.task_id = tt.task_id-->
|
|
||||||
<!-- WHERE-->
|
|
||||||
<!-- tt.task_type = 2 and tt.status = '1'-->
|
|
||||||
<!-- <if test="record.taskId != null and record.taskId != '' ">-->
|
|
||||||
<!-- AND tt.task_id = #{record.taskId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.startTime != null and record.startTime != '' and record.endTime != null and record.endTime != '' ">-->
|
|
||||||
<!-- AND tt.update_time BETWEEN CONCAT(#{record.startTime}, ' 00:00:00') AND CONCAT(#{record.endTime}, ' 23:59:59')-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.unitId != null and record.unitId != ''">-->
|
|
||||||
<!-- AND bui.unit_id = #{record.unitId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.projectId != null and record.projectId != ''">-->
|
|
||||||
<!-- AND bpl.pro_id = #{record.projectId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.keyWord != null and record.keyWord != ''">-->
|
|
||||||
<!-- AND (bai.agreement_code like concat('%', #{record.keyWord}, '%') or-->
|
|
||||||
<!-- tt.code like concat('%', #{record.keyWord}, '%'))-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- GROUP BY tt.task_id-->
|
|
||||||
<!-- ORDER BY tt.update_time DESC-->
|
|
||||||
<!-- </select>-->
|
|
||||||
|
|
||||||
<!-- <select id="getAuditListByLeaseTmTaskByPeople" resultType="com.bonus.material.task.domain.vo.TmTaskRequestVo">-->
|
|
||||||
<!-- SELECT DISTINCT-->
|
|
||||||
<!-- tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,-->
|
|
||||||
<!-- bpl.pro_id as proId,bpl.pro_name as projectName,-->
|
|
||||||
<!-- bui.unit_id as unitId,bui.unit_name as unitName,-->
|
|
||||||
<!-- lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,-->
|
|
||||||
<!-- lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime,-->
|
|
||||||
<!-- bai.agreement_code as agreementCode,-->
|
|
||||||
<!-- tt.create_time as createTimes, tt.update_time as updateTimes-->
|
|
||||||
<!-- FROM-->
|
|
||||||
<!-- tm_task tt-->
|
|
||||||
<!-- LEFT JOIN sys_user su ON tt.create_by = su.user_name-->
|
|
||||||
<!-- LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id-->
|
|
||||||
<!-- LEFT JOIN tm_task_agreement tta ON tt.task_id = tta.task_id-->
|
|
||||||
<!-- LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id-->
|
|
||||||
<!-- LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id-->
|
|
||||||
<!-- LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id-->
|
|
||||||
<!-- LEFT JOIN lease_apply_info lai ON lai.task_id = tt.task_id-->
|
|
||||||
<!-- WHERE-->
|
|
||||||
<!-- tt.task_type = 2 and tt.status = '1' and tt.create_by = #{record.createBy}-->
|
|
||||||
<!-- <if test="record.taskId != null and record.taskId != '' ">-->
|
|
||||||
<!-- AND tt.task_id = #{record.taskId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.startTime != null and record.startTime != '' and record.endTime != null and record.endTime != '' ">-->
|
|
||||||
<!-- AND tt.update_time BETWEEN CONCAT(#{record.startTime}, ' 00:00:00') AND CONCAT(#{record.endTime}, ' 23:59:59')-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.unitId != null and record.unitId != ''">-->
|
|
||||||
<!-- AND bui.unit_id = #{record.unitId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.projectId != null and record.projectId != ''">-->
|
|
||||||
<!-- AND bpl.pro_id = #{record.projectId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="record.keyWord != null and record.keyWord != ''">-->
|
|
||||||
<!-- AND (bai.agreement_code like concat('%', #{record.keyWord}, '%') or-->
|
|
||||||
<!-- tt.code like concat('%', #{record.keyWord}, '%'))-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- GROUP BY tt.task_id-->
|
|
||||||
<!-- ORDER BY tt.update_time DESC-->
|
|
||||||
<!-- </select>-->
|
|
||||||
|
|
||||||
<!-- <select id="getAuditListByLeaseInfo" resultType="com.bonus.material.lease.domain.LeaseApplyInfo">-->
|
|
||||||
<!-- SELECT-->
|
|
||||||
<!-- lai.id, lai.code, lai.task_id as taskId, lai.lease_person as leasePerson, lai.phone, lai.type,-->
|
|
||||||
<!-- lai.create_by as createBy, lai.create_time as createTime, lai.remark, lai.company_id as companyId,-->
|
|
||||||
<!-- lai.status, lai.direct_id as directId, lai.lease_type as leaseType, lai.estimate_lease_time as estimateLeaseTime,-->
|
|
||||||
<!-- lai.cost_bearing_party as costBearingParty-->
|
|
||||||
<!-- FROM-->
|
|
||||||
<!-- lease_apply_info lai-->
|
|
||||||
<!-- WHERE-->
|
|
||||||
<!-- lai.task_id = #{record.taskId} AND lai.`code` = #{record.code}-->
|
|
||||||
<!-- </select>-->
|
|
||||||
|
|
||||||
<!-- <select id="getLeaseApplyDetails" resultType="com.bonus.material.lease.domain.LeaseApplyDetails">-->
|
|
||||||
<!-- SELECT-->
|
|
||||||
<!-- lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,-->
|
|
||||||
<!-- case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,-->
|
|
||||||
<!-- mt.storage_num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode-->
|
|
||||||
<!-- FROM-->
|
|
||||||
<!-- lease_apply_details lad-->
|
|
||||||
<!-- LEFT JOIN ma_type mt ON lad.type_id = mt.type_id-->
|
|
||||||
<!-- LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id-->
|
|
||||||
<!-- LEFT JOIN ma_machine mm ON lad.type_id = mm.type_id-->
|
|
||||||
<!-- WHERE-->
|
|
||||||
<!-- lad.parent_id = #{record.taskId}-->
|
|
||||||
<!-- GROUP BY-->
|
|
||||||
<!-- lad.id-->
|
|
||||||
<!-- </select>-->
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue