Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e570a174d0
|
|
@ -129,10 +129,32 @@ public class TmTask implements Serializable {
|
||||||
private List<LeaseApplyDetails> leaseApplyDetails;
|
private List<LeaseApplyDetails> leaseApplyDetails;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value="协议id")
|
||||||
private Integer agreementId;
|
private Integer agreementId;
|
||||||
private Integer backPerson;
|
@ApiModelProperty(value="退料人")
|
||||||
|
private String backPerson;
|
||||||
|
@ApiModelProperty(value="退料人联系电话")
|
||||||
private String phone;
|
private String phone;
|
||||||
|
@ApiModelProperty(value="退料申请时间")
|
||||||
|
private String backTime;
|
||||||
|
@ApiModelProperty(value="退料审核人")
|
||||||
private String directAuditBy;
|
private String directAuditBy;
|
||||||
|
@ApiModelProperty(value="退料审核时间")
|
||||||
private String directAuditTime;
|
private String directAuditTime;
|
||||||
|
@ApiModelProperty(value="退料审核备注")
|
||||||
private String directAuditRemark;
|
private String directAuditRemark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="往来单位id")
|
||||||
|
private Long unitId;
|
||||||
|
@ApiModelProperty(value="工程id")
|
||||||
|
private Long projectId;
|
||||||
|
@ApiModelProperty(value="关键字")
|
||||||
|
private String keyWord;
|
||||||
|
@ApiModelProperty(value="开始时间")
|
||||||
|
private String startTime;
|
||||||
|
@ApiModelProperty(value="结束时间")
|
||||||
|
private String endTime;
|
||||||
|
@ApiModelProperty(value="类型")
|
||||||
|
private Integer types;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -645,6 +645,16 @@ public class DateTimeHelper {
|
||||||
return sdf.format(afterDate);
|
return sdf.format(afterDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getTimeAfterThirtyDay() {
|
||||||
|
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //制定日期格式
|
||||||
|
Calendar c=Calendar.getInstance();
|
||||||
|
Date date=new Date();
|
||||||
|
c.setTime(date);
|
||||||
|
c.add(Calendar.MONTH,1); //将当前日期加一个月
|
||||||
|
String validityDate=df.format(c.getTime()); //返回String型的时间
|
||||||
|
return validityDate;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取时间戳
|
* 获取时间戳
|
||||||
*/
|
*/
|
||||||
|
|
@ -741,8 +751,10 @@ public class DateTimeHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.err.println(getFisrtDayOfMonth(2023,11));
|
// System.err.println(getFisrtDayOfMonth(2023,11));
|
||||||
System.err.println(getLastDayOfMonth(2023,11));
|
// System.err.println(getLastDayOfMonth(2023,11));
|
||||||
|
System.err.println(getTimeAfterThirtyDay());
|
||||||
|
System.err.println(getNowTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ public class BackApplyController extends BaseController {
|
||||||
|
|
||||||
// 退料编号生成规则
|
// 退料编号生成规则
|
||||||
private String purchaseCodeRule() {
|
private String purchaseCodeRule() {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
Date nowDate = DateUtils.getNowDate();
|
Date nowDate = DateUtils.getNowDate();
|
||||||
String format = dateFormat.format(nowDate);
|
String format = dateFormat.format(nowDate);
|
||||||
int taskNum = tmTaskService.selectTaskNumByMonth(nowDate,36) + 1;
|
int taskNum = tmTaskService.selectTaskNumByMonth(nowDate,36) + 1;
|
||||||
|
|
@ -279,9 +279,9 @@ public class BackApplyController extends BaseController {
|
||||||
@ApiOperation("退料审核列表-审核")
|
@ApiOperation("退料审核列表-审核")
|
||||||
@Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE)
|
@Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("/audit")
|
@PostMapping("/audit")
|
||||||
public AjaxResult audit(String id)
|
public AjaxResult audit(@RequestBody BackApplyInfo record)
|
||||||
{
|
{
|
||||||
return toAjax(backApplyService.audit(id));
|
return toAjax(backApplyService.audit(record));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,18 @@ public class TmTaskController extends BaseController {
|
||||||
return toAjax(tmTaskService.updateLeaseTaskAuditInfo(task));
|
return toAjax(tmTaskService.updateLeaseTaskAuditInfo(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据任务id删除任务表及任务信息
|
||||||
|
*/
|
||||||
|
@Log(title = "删除任务", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{taskId}")
|
||||||
|
public AjaxResult deleteTaskInfoByTaskId(@PathVariable String taskId) {
|
||||||
|
if (StringUtils.isEmpty(taskId)) {
|
||||||
|
return AjaxResult.error("参数错误,删除失败!");
|
||||||
|
}
|
||||||
|
return tmTaskService.deleteByPrimaryKey(taskId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 往来单位提交工程领用机具信息
|
* 往来单位提交工程领用机具信息
|
||||||
|
|
@ -217,6 +229,33 @@ public class TmTaskController extends BaseController {
|
||||||
return AjaxResult.success(getDataTable(leaseAuditList));
|
return AjaxResult.success(getDataTable(leaseAuditList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改任务信息
|
||||||
|
*/
|
||||||
|
@Log(title = "修改任务信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
public AjaxResult edit(@RequestBody TmTask task) {
|
||||||
|
if (StringUtils.isNull(task)) {
|
||||||
|
return AjaxResult.error("参数错误,传入信息为空!");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// 任务编号
|
||||||
|
String taskId = task.getId();
|
||||||
|
// 任务类型
|
||||||
|
Integer taskType = task.getTaskType();
|
||||||
|
// 任务状态
|
||||||
|
Integer taskStatus = task.getTaskStatus();
|
||||||
|
int taskResult = tmTaskService.updateByPrimaryKeySelective(task);
|
||||||
|
if (taskResult > 0) {
|
||||||
|
return AjaxResult.success("任务表修改成功");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("任务表修改失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error("修改失败,异常信息:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过主键查询单条数据
|
* 通过主键查询单条数据
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,5 @@ public interface BackApplyMapper {
|
||||||
|
|
||||||
List<BackApplyInfo> examineView(BackApplyInfo record);
|
List<BackApplyInfo> examineView(BackApplyInfo record);
|
||||||
|
|
||||||
int audit(String id);
|
int audit(BackApplyInfo record);
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +39,9 @@ public interface TmTaskMapper {
|
||||||
/** 更新leaseApplyDetails审批信息 */
|
/** 更新leaseApplyDetails审批信息 */
|
||||||
int updateLeaseApplyDetailsAuditInfo(@Param("record") LeaseApplyDetails record);
|
int updateLeaseApplyDetailsAuditInfo(@Param("record") LeaseApplyDetails record);
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long taskId);
|
int deleteTaskByPrimaryKey(String taskId);
|
||||||
|
|
||||||
|
int deleteTaskInfoByTaskId(String taskId);
|
||||||
|
|
||||||
int insert(TmTask record);
|
int insert(TmTask record);
|
||||||
|
|
||||||
|
|
@ -51,6 +53,11 @@ public interface TmTaskMapper {
|
||||||
|
|
||||||
TmTask selectByPrimaryKey(Long taskId);
|
TmTask selectByPrimaryKey(Long taskId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改Tm_task任务表
|
||||||
|
* @param record 参数对象
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
int updateByPrimaryKeySelective(TmTask record);
|
int updateByPrimaryKeySelective(TmTask record);
|
||||||
|
|
||||||
int updateByPrimaryKey(TmTask record);
|
int updateByPrimaryKey(TmTask record);
|
||||||
|
|
|
||||||
|
|
@ -44,5 +44,5 @@ public interface BackApplyService {
|
||||||
|
|
||||||
List<BackApplyInfo> examineView(BackApplyInfo record);
|
List<BackApplyInfo> examineView(BackApplyInfo record);
|
||||||
|
|
||||||
int audit(String id);
|
int audit(BackApplyInfo record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package com.bonus.sgzb.app.service;
|
package com.bonus.sgzb.app.service;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import com.bonus.sgzb.base.api.domain.TmTask;
|
import com.bonus.sgzb.base.api.domain.TmTask;
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,7 +23,7 @@ public interface TmTaskService{
|
||||||
|
|
||||||
String genderLeaseCode();
|
String genderLeaseCode();
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long taskId);
|
AjaxResult deleteByPrimaryKey(String taskId);
|
||||||
|
|
||||||
int createTask(TmTask record);
|
int createTask(TmTask record);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ public class BackApplyServiceImpl implements BackApplyService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int audit(String id) {
|
public int audit(BackApplyInfo record) {
|
||||||
return backApplyMapper.audit(id);
|
return backApplyMapper.audit(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.bonus.sgzb.base.api.domain.LeaseApplyInfo;
|
||||||
import com.bonus.sgzb.base.api.domain.TmTask;
|
import com.bonus.sgzb.base.api.domain.TmTask;
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
@ -110,8 +111,16 @@ public class TmTaskServiceImpl implements TmTaskService{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteByPrimaryKey(Long taskId) {
|
public AjaxResult deleteByPrimaryKey(String taskId) {
|
||||||
return tmTaskMapper.deleteByPrimaryKey(taskId);
|
boolean taskFlag = tmTaskMapper.deleteTaskByPrimaryKey(taskId) > 0;
|
||||||
|
boolean infoFlag = tmTaskMapper.deleteTaskInfoByTaskId(taskId) > 0;
|
||||||
|
if (taskFlag && infoFlag) {
|
||||||
|
return AjaxResult.success("删除成功");
|
||||||
|
} else if (taskFlag || infoFlag) {
|
||||||
|
return AjaxResult.error("删除失败,任务表或信息表未删除!");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("删除失败,请检查任务ID是否正确!!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -83,4 +83,9 @@ public class LargeScreenController extends BaseController {
|
||||||
return service.getCarUseByMonth();
|
return service.getCarUseByMonth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "检修预警", businessType = BusinessType.QUERY)
|
||||||
|
@PostMapping("getMaintenanceWarning")
|
||||||
|
public AjaxResult getMaintenanceWarning() {
|
||||||
|
return service.getMaintenanceWarning();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.bonus.sgzb.largeScreen.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
* 检修预警-vo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MaintenanceWarningVo {
|
||||||
|
|
||||||
|
/** 机具名称*/
|
||||||
|
private String machineName;
|
||||||
|
|
||||||
|
/** 机具编号*/
|
||||||
|
private String maCode;
|
||||||
|
|
||||||
|
/** 规格型号*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
/** 下次检修日期*/
|
||||||
|
private String nextCheckTime;
|
||||||
|
}
|
||||||
|
|
@ -92,4 +92,13 @@ public interface LargeScreenMapper {
|
||||||
* @date 2023/12/15 18:57
|
* @date 2023/12/15 18:57
|
||||||
*/
|
*/
|
||||||
List<ScrapAnalysisVo> getTotalOwnership(ParamsDto dto);
|
List<ScrapAnalysisVo> getTotalOwnership(ParamsDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return List<MaintenanceWarningVo>
|
||||||
|
* @description 检修预警
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/21 9:53
|
||||||
|
*/
|
||||||
|
List<MaintenanceWarningVo> getMaintenanceWarning(ParamsDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,4 +88,12 @@ public interface ILargeScreenService {
|
||||||
* @date 2023/12/13 15:40
|
* @date 2023/12/13 15:40
|
||||||
*/
|
*/
|
||||||
AjaxResult getCarUseByMonth();
|
AjaxResult getCarUseByMonth();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return AjaxResult
|
||||||
|
* @description 检修预警
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/21 9:42
|
||||||
|
*/
|
||||||
|
AjaxResult getMaintenanceWarning();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -317,6 +317,20 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
list.add(carUseVo6);
|
list.add(carUseVo6);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getMaintenanceWarning() {
|
||||||
|
List<MaintenanceWarningVo> list = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
ParamsDto dto = new ParamsDto();
|
||||||
|
dto.setStartDate(DateTimeHelper.getNowTime());
|
||||||
|
dto.setEndDate(DateTimeHelper.getTimeAfterThirtyDay());
|
||||||
|
list = mapper.getMaintenanceWarning(dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("检修预警-查询失败",e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,9 @@
|
||||||
<if test="backPerson != null and backPerson != ''">
|
<if test="backPerson != null and backPerson != ''">
|
||||||
back_person,
|
back_person,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="backTime != null and backTime != ''">
|
||||||
|
back_time,
|
||||||
|
</if>
|
||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
phone,
|
phone,
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -182,6 +185,9 @@
|
||||||
<if test="backPerson != null and backPerson != ''">
|
<if test="backPerson != null and backPerson != ''">
|
||||||
#{backPerson},
|
#{backPerson},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="backTime != null and backTime != ''">
|
||||||
|
#{backTime},
|
||||||
|
</if>
|
||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
#{phone},
|
#{phone},
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -269,7 +275,12 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<update id="audit">
|
<update id="audit">
|
||||||
UPDATE tm_task SET task_status = 38 WHERE task_id = #{id}
|
UPDATE tm_task tt
|
||||||
|
LEFT JOIN back_apply_info bai ON bai.task_id = tt.task_id
|
||||||
|
LEFT JOIN back_apply_details bad on bad.parent_id=bai.id
|
||||||
|
SET tt.task_status = '38',bad.audit_num=bad.pre_num,bai.direct_audit_by=#{createBy},bai.direct_audit_time=NOW()
|
||||||
|
WHERE
|
||||||
|
bai.id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<delete id="del">
|
<delete id="del">
|
||||||
DELETE FROM back_apply_info WHERE id = #{id}
|
DELETE FROM back_apply_info WHERE id = #{id}
|
||||||
|
|
@ -336,23 +347,19 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="materialList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="materialList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
SELECT
|
SELECT subquery1.type_id as typeId,
|
||||||
subquery1.type_id as typeId,
|
|
||||||
subquery1.typeName typeCode,
|
subquery1.typeName typeCode,
|
||||||
subquery1.typeNames as typeName,
|
subquery1.typeNames as typeName,
|
||||||
subquery1.out_num - COALESCE(subquery2.pre_num, 0) AS num,
|
subquery1.out_num - COALESCE(subquery2.audit_num, 0) AS num,
|
||||||
subquery1.ma_code as maCode
|
subquery1.ma_code as maCode
|
||||||
FROM
|
FROM (
|
||||||
(
|
|
||||||
-- 第一个查询作为子查询
|
-- 第一个查询作为子查询
|
||||||
SELECT
|
SELECT mt.type_id,
|
||||||
mt.type_id,
|
|
||||||
mt.type_name as typeName,
|
mt.type_name as typeName,
|
||||||
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
||||||
lod.out_num,
|
lod.out_num,
|
||||||
mm.ma_code
|
mm.ma_code
|
||||||
FROM
|
FROM tm_task_agreement tta
|
||||||
tm_task_agreement tta
|
|
||||||
LEFT JOIN lease_apply_info lai on lai.task_id = tta.task_id
|
LEFT JOIN lease_apply_info lai on lai.task_id = tta.task_id
|
||||||
LEFT JOIN lease_out_details lod on lod.parent_id = lai.id
|
LEFT JOIN lease_out_details lod on lod.parent_id = lai.id
|
||||||
LEFT JOIN ma_type mt on mt.type_id = lod.type_id
|
LEFT JOIN ma_type mt on mt.type_id = lod.type_id
|
||||||
|
|
@ -362,21 +369,17 @@
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
|
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
|
||||||
WHERE
|
WHERE tta.agreement_id = #{agreementId}
|
||||||
tta.agreement_id=#{agreementId}
|
|
||||||
and tt.task_type = '29'
|
and tt.task_type = '29'
|
||||||
and tt.task_status='35'
|
|
||||||
) AS subquery1
|
) AS subquery1
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(
|
(
|
||||||
-- 第二个查询作为子查询
|
-- 第二个查询作为子查询
|
||||||
SELECT
|
SELECT mt.type_id,
|
||||||
mt.type_id,
|
|
||||||
mt.type_name,
|
mt.type_name,
|
||||||
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
|
||||||
bad.pre_num
|
bad.audit_num
|
||||||
FROM
|
FROM tm_task tt
|
||||||
tm_task tt
|
|
||||||
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 back_apply_info bai on bai.task_id = tta.task_id
|
LEFT JOIN back_apply_info bai on bai.task_id = tta.task_id
|
||||||
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
||||||
|
|
@ -385,10 +388,8 @@
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
WHERE
|
WHERE tta.agreement_id = #{agreementId}
|
||||||
tta.agreement_id=#{agreementId}
|
|
||||||
and tt.task_type = '36'
|
and tt.task_type = '36'
|
||||||
and tt.task_status='40'
|
|
||||||
) AS subquery2
|
) AS subquery2
|
||||||
ON subquery1.type_id = subquery2.type_id
|
ON subquery1.type_id = subquery2.type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,20 @@
|
||||||
from tm_task
|
from tm_task
|
||||||
where task_id = #{taskId,jdbcType=BIGINT}
|
where task_id = #{taskId,jdbcType=BIGINT}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTaskNumByMonth" resultType="java.lang.Integer">
|
<select id="selectTaskNumByMonth" resultType="java.lang.Integer">
|
||||||
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
|
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
<update id="deleteTaskByPrimaryKey" parameterType="java.lang.Long">
|
||||||
delete from tm_task
|
update tm_task set `status` = '0'
|
||||||
where task_id = #{taskId,jdbcType=BIGINT}
|
where task_id = #{taskId,jdbcType=BIGINT}
|
||||||
</delete>
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteTaskInfoByTaskId" parameterType="java.lang.Long">
|
||||||
|
update lease_apply_info set `status` = '0'
|
||||||
|
where task_id = #{taskId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<insert id="insert" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.base.api.domain.TmTask" useGeneratedKeys="true">
|
<insert id="insert" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.base.api.domain.TmTask" useGeneratedKeys="true">
|
||||||
insert into tm_task (task_type, task_status, code, create_by, create_time, update_by, update_time, remark, company_id)
|
insert into tm_task (task_type, task_status, code, create_by, create_time, update_by, update_time, remark, company_id)
|
||||||
|
|
@ -101,7 +107,6 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.sgzb.base.api.domain.TmTask">
|
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.sgzb.base.api.domain.TmTask">
|
||||||
<!--@mbg.generated-->
|
|
||||||
update tm_task
|
update tm_task
|
||||||
<set>
|
<set>
|
||||||
<if test="taskType != null">
|
<if test="taskType != null">
|
||||||
|
|
@ -110,15 +115,6 @@
|
||||||
<if test="taskStatus != null">
|
<if test="taskStatus != null">
|
||||||
task_status = #{taskStatus,jdbcType=INTEGER},
|
task_status = #{taskStatus,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="code != null and code != ''">
|
|
||||||
code = #{code,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null and createBy != ''">
|
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
||||||
</if>
|
|
||||||
<if test="updateBy != null and updateBy != ''">
|
<if test="updateBy != null and updateBy != ''">
|
||||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -128,9 +124,6 @@
|
||||||
<if test="remark != null and remark != ''">
|
<if test="remark != null and remark != ''">
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null">
|
|
||||||
company_id = #{companyId,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
</set>
|
</set>
|
||||||
where task_id = #{taskId,jdbcType=BIGINT}
|
where task_id = #{taskId,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -457,7 +450,7 @@
|
||||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
||||||
LEFT JOIN bm_project_info bpi ON bpi.pro_id = bai.project_id
|
LEFT JOIN bm_project_info bpi ON bpi.pro_id = bai.project_id
|
||||||
WHERE
|
WHERE
|
||||||
tt.task_type = '29'
|
tt.task_type = '29' and tt.status = '1'
|
||||||
<if test="record.taskId != null and record.taskId != '' ">
|
<if test="record.taskId != null and record.taskId != '' ">
|
||||||
AND tt.task_id = #{record.taskId}
|
AND tt.task_id = #{record.taskId}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -469,7 +462,7 @@
|
||||||
FROM
|
FROM
|
||||||
lease_apply_info lai
|
lease_apply_info lai
|
||||||
WHERE
|
WHERE
|
||||||
lai.task_id = #{record.taskId} AND lai.`code` = #{record.code}
|
lai.task_id = #{record.taskId} AND lai.`code` = #{record.code} AND lai.status = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeaseApplyDetails" resultType="com.bonus.sgzb.base.api.domain.LeaseApplyDetails">
|
<select id="getLeaseApplyDetails" resultType="com.bonus.sgzb.base.api.domain.LeaseApplyDetails">
|
||||||
|
|
|
||||||
|
|
@ -347,4 +347,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<!--检修预警-->
|
||||||
|
<select id="getMaintenanceWarning" resultType="com.bonus.sgzb.largeScreen.domain.MaintenanceWarningVo">
|
||||||
|
SELECT mm.ma_code AS maCode,
|
||||||
|
a.typeName,
|
||||||
|
a.typeName2 AS machineName,
|
||||||
|
mm.next_check_time
|
||||||
|
FROM ma_machine mm
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT mt.type_id,mt.type_name AS typeName,mt2.type_name AS typeName2
|
||||||
|
FROM ma_type mt
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||||
|
WHERE mt.`level` = '4'
|
||||||
|
)a ON mm.type_id = a.type_id
|
||||||
|
WHERE mm.next_check_time BETWEEN #{startDate} AND #{endDate}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -111,4 +111,10 @@ public class SelectController {
|
||||||
public AjaxResult getUserByRoleIdCbx(@RequestBody SelectDto dto){
|
public AjaxResult getUserByRoleIdCbx(@RequestBody SelectDto dto){
|
||||||
return service.getUserByRoleIdCbx(dto);
|
return service.getUserByRoleIdCbx(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "往来单位id和标段工程id获取协议信息")
|
||||||
|
@PostMapping("getAgreementInfoById")
|
||||||
|
public AjaxResult getAgreementInfoById(@RequestBody SelectDto dto){
|
||||||
|
return service.getAgreementInfoById(dto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.bonus.sgzb.system.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10488
|
||||||
|
* 协议信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AgreementVo {
|
||||||
|
|
||||||
|
/** 协议ID*/
|
||||||
|
private Integer agreementId;
|
||||||
|
|
||||||
|
/** 协议编号*/
|
||||||
|
private String agreementCode;
|
||||||
|
}
|
||||||
|
|
@ -25,4 +25,10 @@ public class SelectDto {
|
||||||
/** 角色权限字符串*/
|
/** 角色权限字符串*/
|
||||||
private String roleKey;
|
private String roleKey;
|
||||||
|
|
||||||
|
/** 往来单位id*/
|
||||||
|
private int unitId;
|
||||||
|
|
||||||
|
/** 标段工程id*/
|
||||||
|
private int projectId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,12 @@ public class TreeNode {
|
||||||
|
|
||||||
private long parentId;
|
private long parentId;
|
||||||
|
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private List<TreeNode> children = new ArrayList<>();
|
private List<TreeNode> children = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.sgzb.system.mapper;
|
package com.bonus.sgzb.system.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.system.domain.AgreementVo;
|
||||||
import com.bonus.sgzb.system.domain.SelectDto;
|
import com.bonus.sgzb.system.domain.SelectDto;
|
||||||
import com.bonus.sgzb.system.domain.SelectVo;
|
import com.bonus.sgzb.system.domain.SelectVo;
|
||||||
import com.bonus.sgzb.system.domain.TreeNode;
|
import com.bonus.sgzb.system.domain.TreeNode;
|
||||||
|
|
@ -156,4 +157,13 @@ public interface SelectMapper {
|
||||||
* @date 2023/12/20 21:02
|
* @date 2023/12/20 21:02
|
||||||
*/
|
*/
|
||||||
List<TreeNode> getUserByRoleIdCbxTree(SelectDto dto);
|
List<TreeNode> getUserByRoleIdCbxTree(SelectDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return AgreementVo
|
||||||
|
* @description 往来单位id和标段工程id获取协议信息
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/21 10:53
|
||||||
|
*/
|
||||||
|
List<AgreementVo> getAgreementInfoById(SelectDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,4 +143,13 @@ public interface SelectService {
|
||||||
* @date 2023/12/20 20:48
|
* @date 2023/12/20 20:48
|
||||||
*/
|
*/
|
||||||
AjaxResult getUserByRoleIdCbx(SelectDto dto);
|
AjaxResult getUserByRoleIdCbx(SelectDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param dto
|
||||||
|
* @return AjaxResult
|
||||||
|
* @description 往来单位id和标段工程id获取协议信息
|
||||||
|
* @author cwchen
|
||||||
|
* @date 2023/12/21 10:47
|
||||||
|
*/
|
||||||
|
AjaxResult getAgreementInfoById(SelectDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.system.service.impl;
|
package com.bonus.sgzb.system.service.impl;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.sgzb.system.domain.AgreementVo;
|
||||||
import com.bonus.sgzb.system.domain.SelectDto;
|
import com.bonus.sgzb.system.domain.SelectDto;
|
||||||
import com.bonus.sgzb.system.domain.SelectVo;
|
import com.bonus.sgzb.system.domain.SelectVo;
|
||||||
import com.bonus.sgzb.system.domain.TreeNode;
|
import com.bonus.sgzb.system.domain.TreeNode;
|
||||||
|
|
@ -235,4 +236,18 @@ public class SelectServiceImpl implements SelectService {
|
||||||
}
|
}
|
||||||
return AjaxResult.success(null);
|
return AjaxResult.success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getAgreementInfoById(SelectDto dto) {
|
||||||
|
AgreementVo vo = new AgreementVo();
|
||||||
|
try {
|
||||||
|
List<AgreementVo> list = mapper.getAgreementInfoById(dto);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
vo = list.get(0);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("往来单位id和标段工程id获取协议信息", e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(vo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@ server:
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-request-size: 10MB
|
||||||
|
max-file-size: 10MB
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: sgzb-system
|
name: sgzb-system
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getDeviceTypeTree" resultType="com.bonus.sgzb.system.domain.TreeNode">
|
<select id="getDeviceTypeTree" resultType="com.bonus.sgzb.system.domain.TreeNode">
|
||||||
SELECT type_id AS id,
|
SELECT type_id AS id,
|
||||||
type_name AS label,
|
type_name AS label,
|
||||||
parent_id AS parentId
|
parent_id AS parentId,
|
||||||
|
unit_name AS unitName
|
||||||
FROM ma_type
|
FROM ma_type
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
<if test="level!=null and level!=''">
|
<if test="level!=null and level!=''">
|
||||||
|
|
@ -129,14 +130,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT pro_id AS id,
|
SELECT pro_id AS id,
|
||||||
pro_name AS `name`
|
pro_name AS `name`
|
||||||
FROM bm_project_info
|
FROM bm_project_info
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0' AND status = '0'
|
||||||
ORDER BY create_time
|
ORDER BY create_time
|
||||||
</select>
|
</select>
|
||||||
<!--配件所属上级树-->
|
<!--配件所属上级树-->
|
||||||
<select id="getAccessoryTree" resultType="com.bonus.sgzb.system.domain.TreeNode">
|
<select id="getAccessoryTree" resultType="com.bonus.sgzb.system.domain.TreeNode">
|
||||||
SELECT pa_id AS id,
|
SELECT pa_id AS id,
|
||||||
pa_name AS label,
|
pa_name AS label,
|
||||||
parent_id AS parentId
|
parent_id AS parentId,
|
||||||
|
level
|
||||||
FROM ma_part_type
|
FROM ma_part_type
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
ORDER BY create_time
|
ORDER BY create_time
|
||||||
|
|
@ -174,4 +176,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN sys_user su ON sur.user_id = su.user_id AND su.del_flag = '0'
|
LEFT JOIN sys_user su ON sur.user_id = su.user_id AND su.del_flag = '0'
|
||||||
WHERE sr.role_key = #{roleKey} AND sr.del_flag = '0'
|
WHERE sr.role_key = #{roleKey} AND sr.del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
<!--往来单位id和标段工程id获取协议信息-->
|
||||||
|
<select id="getAgreementInfoById" resultType="com.bonus.sgzb.system.domain.AgreementVo">
|
||||||
|
SELECT agreement_id AS agreementId,
|
||||||
|
agreement_code AS agreementCode
|
||||||
|
FROM bm_agreement_info
|
||||||
|
WHERE unit_id = #{unitId} AND project_id = #{projectId} AND status = '1'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue