Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zhouxain01 2023-12-21 17:54:34 +08:00
commit e570a174d0
27 changed files with 337 additions and 98 deletions

View File

@ -129,10 +129,32 @@ public class TmTask implements Serializable {
private List<LeaseApplyDetails> leaseApplyDetails;
@ApiModelProperty(value="协议id")
private Integer agreementId;
private Integer backPerson;
@ApiModelProperty(value="退料人")
private String backPerson;
@ApiModelProperty(value="退料人联系电话")
private String phone;
@ApiModelProperty(value="退料申请时间")
private String backTime;
@ApiModelProperty(value="退料审核人")
private String directAuditBy;
@ApiModelProperty(value="退料审核时间")
private String directAuditTime;
@ApiModelProperty(value="退料审核备注")
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;
}

View File

@ -645,6 +645,16 @@ public class DateTimeHelper {
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) {
System.err.println(getFisrtDayOfMonth(2023,11));
System.err.println(getLastDayOfMonth(2023,11));
// System.err.println(getFisrtDayOfMonth(2023,11));
// System.err.println(getLastDayOfMonth(2023,11));
System.err.println(getTimeAfterThirtyDay());
System.err.println(getNowTime());
}
/**

View File

@ -241,7 +241,7 @@ public class BackApplyController extends BaseController {
// 退料编号生成规则
private String purchaseCodeRule() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
Date nowDate = DateUtils.getNowDate();
String format = dateFormat.format(nowDate);
int taskNum = tmTaskService.selectTaskNumByMonth(nowDate,36) + 1;
@ -279,9 +279,9 @@ public class BackApplyController extends BaseController {
@ApiOperation("退料审核列表-审核")
@Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE)
@PostMapping("/audit")
public AjaxResult audit(String id)
public AjaxResult audit(@RequestBody BackApplyInfo record)
{
return toAjax(backApplyService.audit(id));
return toAjax(backApplyService.audit(record));
}
}

View File

@ -50,6 +50,18 @@ public class TmTaskController extends BaseController {
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));
}
/**
* 修改任务信息
*/
@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());
}
}
/**
* 通过主键查询单条数据
*

View File

@ -41,5 +41,5 @@ public interface BackApplyMapper {
List<BackApplyInfo> examineView(BackApplyInfo record);
int audit(String id);
int audit(BackApplyInfo record);
}

View File

@ -39,7 +39,9 @@ public interface TmTaskMapper {
/** 更新leaseApplyDetails审批信息 */
int updateLeaseApplyDetailsAuditInfo(@Param("record") LeaseApplyDetails record);
int deleteByPrimaryKey(Long taskId);
int deleteTaskByPrimaryKey(String taskId);
int deleteTaskInfoByTaskId(String taskId);
int insert(TmTask record);
@ -51,6 +53,11 @@ public interface TmTaskMapper {
TmTask selectByPrimaryKey(Long taskId);
/**
* 修改Tm_task任务表
* @param record 参数对象
* @return 结果
*/
int updateByPrimaryKeySelective(TmTask record);
int updateByPrimaryKey(TmTask record);

View File

@ -44,5 +44,5 @@ public interface BackApplyService {
List<BackApplyInfo> examineView(BackApplyInfo record);
int audit(String id);
int audit(BackApplyInfo record);
}

View File

@ -1,10 +1,10 @@
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.common.core.web.domain.AjaxResult;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
@ -23,7 +23,7 @@ public interface TmTaskService{
String genderLeaseCode();
int deleteByPrimaryKey(Long taskId);
AjaxResult deleteByPrimaryKey(String taskId);
int createTask(TmTask record);

View File

@ -82,8 +82,8 @@ public class BackApplyServiceImpl implements BackApplyService {
}
@Override
public int audit(String id) {
return backApplyMapper.audit(id);
public int audit(BackApplyInfo record) {
return backApplyMapper.audit(record);
}
}

View File

@ -8,6 +8,7 @@ import com.bonus.sgzb.base.api.domain.LeaseApplyInfo;
import com.bonus.sgzb.base.api.domain.TmTask;
import com.bonus.sgzb.common.core.utils.DateUtils;
import com.bonus.sgzb.common.core.utils.StringUtils;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -110,8 +111,16 @@ public class TmTaskServiceImpl implements TmTaskService{
}
@Override
public int deleteByPrimaryKey(Long taskId) {
return tmTaskMapper.deleteByPrimaryKey(taskId);
public AjaxResult deleteByPrimaryKey(String 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

View File

@ -83,4 +83,9 @@ public class LargeScreenController extends BaseController {
return service.getCarUseByMonth();
}
@Log(title = "检修预警", businessType = BusinessType.QUERY)
@PostMapping("getMaintenanceWarning")
public AjaxResult getMaintenanceWarning() {
return service.getMaintenanceWarning();
}
}

View File

@ -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;
}

View File

@ -92,4 +92,13 @@ public interface LargeScreenMapper {
* @date 2023/12/15 18:57
*/
List<ScrapAnalysisVo> getTotalOwnership(ParamsDto dto);
/**
* @param dto
* @return List<MaintenanceWarningVo>
* @description 检修预警
* @author cwchen
* @date 2023/12/21 9:53
*/
List<MaintenanceWarningVo> getMaintenanceWarning(ParamsDto dto);
}

View File

@ -88,4 +88,12 @@ public interface ILargeScreenService {
* @date 2023/12/13 15:40
*/
AjaxResult getCarUseByMonth();
/**
* @return AjaxResult
* @description 检修预警
* @author cwchen
* @date 2023/12/21 9:42
*/
AjaxResult getMaintenanceWarning();
}

View File

@ -103,7 +103,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
* @author cwchen
* @date 2023/12/15 19:33
*/
public TotalOwnershipVo countNum(String maType,String maTypeName) {
public TotalOwnershipVo countNum(String maType, String maTypeName) {
TotalOwnershipVo vo = new TotalOwnershipVo();
ParamsDto dto = new ParamsDto();
dto.setMaType(maType);
@ -317,6 +317,20 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
list.add(carUseVo6);
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);
}
}

View File

@ -144,6 +144,9 @@
<if test="backPerson != null and backPerson != ''">
back_person,
</if>
<if test="backTime != null and backTime != ''">
back_time,
</if>
<if test="phone != null and phone != ''">
phone,
</if>
@ -182,6 +185,9 @@
<if test="backPerson != null and backPerson != ''">
#{backPerson},
</if>
<if test="backTime != null and backTime != ''">
#{backTime},
</if>
<if test="phone != null and phone != ''">
#{phone},
</if>
@ -269,7 +275,12 @@
)
</insert>
<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>
<delete id="del">
DELETE FROM back_apply_info WHERE id = #{id}
@ -336,61 +347,51 @@
</select>
<select id="materialList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
SELECT
subquery1.type_id as typeId,
subquery1.typeName typeCode,
subquery1.typeNames as typeName,
subquery1.out_num - COALESCE(subquery2.pre_num, 0) AS num,
subquery1.ma_code as maCode
FROM
(
-- 第一个查询作为子查询
SELECT
mt.type_id,
mt.type_name as typeName,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
lod.out_num,
mm.ma_code
FROM
tm_task_agreement tta
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 ma_type mt on mt.type_id=lod.type_id
LEFT JOIN tm_task tt on tt.task_id=tta.task_id
LEFT JOIN ma_type mt1 ON mt1.type_id=lod.type_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 mt4 ON mt4.type_id=mt3.parent_id
LEFT JOIN ma_machine mm on mm.ma_id=lod.ma_id
WHERE
tta.agreement_id=#{agreementId}
and tt.task_type='29'
and tt.task_status='35'
) AS subquery1
LEFT JOIN
(
-- 第二个查询作为子查询
SELECT
mt.type_id,
mt.type_name,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
bad.pre_num
FROM
tm_task tt
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_details bad on bad.parent_id=bai.id
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_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 mt4 ON mt4.type_id=mt3.parent_id
WHERE
tta.agreement_id=#{agreementId}
and tt.task_type='36'
and tt.task_status='40'
) AS subquery2
ON subquery1.type_id = subquery2.type_id
SELECT subquery1.type_id as typeId,
subquery1.typeName typeCode,
subquery1.typeNames as typeName,
subquery1.out_num - COALESCE(subquery2.audit_num, 0) AS num,
subquery1.ma_code as maCode
FROM (
-- 第一个查询作为子查询
SELECT mt.type_id,
mt.type_name as typeName,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
lod.out_num,
mm.ma_code
FROM tm_task_agreement tta
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 ma_type mt on mt.type_id = lod.type_id
LEFT JOIN tm_task tt on tt.task_id = tta.task_id
LEFT JOIN ma_type mt1 ON mt1.type_id = lod.type_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 mt4 ON mt4.type_id = mt3.parent_id
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
WHERE tta.agreement_id = #{agreementId}
and tt.task_type = '29'
) AS subquery1
LEFT JOIN
(
-- 第二个查询作为子查询
SELECT mt.type_id,
mt.type_name,
CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeNames,
bad.audit_num
FROM tm_task tt
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_details bad on bad.parent_id = bai.id
LEFT JOIN ma_type mt on mt.type_id = bad.type_id
LEFT JOIN ma_type mt1 ON mt1.type_id = bad.type_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 mt4 ON mt4.type_id = mt3.parent_id
WHERE tta.agreement_id = #{agreementId}
and tt.task_type = '36'
) AS subquery2
ON subquery1.type_id = subquery2.type_id
</select>
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">

View File

@ -27,14 +27,20 @@
from tm_task
where task_id = #{taskId,jdbcType=BIGINT}
</select>
<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>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tm_task
<update id="deleteTaskByPrimaryKey" parameterType="java.lang.Long">
update tm_task set `status` = '0'
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 into tm_task (task_type, task_status, code, create_by, create_time, update_by, update_time, remark, company_id)
@ -101,7 +107,6 @@
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.sgzb.base.api.domain.TmTask">
<!--@mbg.generated-->
update tm_task
<set>
<if test="taskType != null">
@ -110,15 +115,6 @@
<if test="taskStatus != null">
task_status = #{taskStatus,jdbcType=INTEGER},
</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 != ''">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
@ -128,9 +124,6 @@
<if test="remark != null and remark != ''">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
</set>
where task_id = #{taskId,jdbcType=BIGINT}
</update>
@ -457,7 +450,7 @@
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
WHERE
tt.task_type = '29'
tt.task_type = '29' and tt.status = '1'
<if test="record.taskId != null and record.taskId != '' ">
AND tt.task_id = #{record.taskId}
</if>
@ -469,7 +462,7 @@
FROM
lease_apply_info lai
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 id="getLeaseApplyDetails" resultType="com.bonus.sgzb.base.api.domain.LeaseApplyDetails">

View File

@ -347,4 +347,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</if>
</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>

View File

@ -111,4 +111,10 @@ public class SelectController {
public AjaxResult getUserByRoleIdCbx(@RequestBody SelectDto dto){
return service.getUserByRoleIdCbx(dto);
}
@ApiOperation(value = "往来单位id和标段工程id获取协议信息")
@PostMapping("getAgreementInfoById")
public AjaxResult getAgreementInfoById(@RequestBody SelectDto dto){
return service.getAgreementInfoById(dto);
}
}

View File

@ -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;
}

View File

@ -25,4 +25,10 @@ public class SelectDto {
/** 角色权限字符串*/
private String roleKey;
/** 往来单位id*/
private int unitId;
/** 标段工程id*/
private int projectId;
}

View File

@ -19,6 +19,12 @@ public class TreeNode {
private long parentId;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private String level;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private String unitName;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeNode> children = new ArrayList<>();
}

View File

@ -1,5 +1,6 @@
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.SelectVo;
import com.bonus.sgzb.system.domain.TreeNode;
@ -156,4 +157,13 @@ public interface SelectMapper {
* @date 2023/12/20 21:02
*/
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);
}

View File

@ -143,4 +143,13 @@ public interface SelectService {
* @date 2023/12/20 20:48
*/
AjaxResult getUserByRoleIdCbx(SelectDto dto);
/**
* @param dto
* @return AjaxResult
* @description 往来单位id和标段工程id获取协议信息
* @author cwchen
* @date 2023/12/21 10:47
*/
AjaxResult getAgreementInfoById(SelectDto dto);
}

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.system.service.impl;
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.SelectVo;
import com.bonus.sgzb.system.domain.TreeNode;
@ -212,12 +213,12 @@ public class SelectServiceImpl implements SelectService {
@Override
public AjaxResult getUserByRoleIdCbx(SelectDto dto) {
try {
if(Objects.equals("1",dto.getType())){
if (Objects.equals("1", dto.getType())) {
// 用户/维修员/库管员/采购员-下拉选
List<SelectVo> list = new ArrayList<>();
list = mapper.getUserByRoleIdCbxSelect(dto);
return AjaxResult.success(list);
}else if(Objects.equals("2",dto.getType())){
} else if (Objects.equals("2", dto.getType())) {
List<TreeNode> groupList = new ArrayList<>();
List<TreeNode> list = new ArrayList<>();
// 用户/维修员/库管员/采购员-
@ -231,8 +232,22 @@ public class SelectServiceImpl implements SelectService {
return AjaxResult.success(groupList);
}
} catch (Exception e) {
log.error("用户/维修员/库管员/采购员-查询失败",e);
log.error("用户/维修员/库管员/采购员-查询失败", e);
}
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);
}
}

View File

@ -3,7 +3,11 @@ server:
port: 9201
# Spring
spring:
spring:
servlet:
multipart:
max-request-size: 10MB
max-file-size: 10MB
application:
# 应用名称
name: sgzb-system

View File

@ -92,7 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getDeviceTypeTree" resultType="com.bonus.sgzb.system.domain.TreeNode">
SELECT type_id AS id,
type_name AS label,
parent_id AS parentId
parent_id AS parentId,
unit_name AS unitName
FROM ma_type
WHERE del_flag = '0'
<if test="level!=null and level!=''">
@ -129,14 +130,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT pro_id AS id,
pro_name AS `name`
FROM bm_project_info
WHERE del_flag = '0'
WHERE del_flag = '0' AND status = '0'
ORDER BY create_time
</select>
<!--配件所属上级树-->
<select id="getAccessoryTree" resultType="com.bonus.sgzb.system.domain.TreeNode">
SELECT pa_id AS id,
pa_name AS label,
parent_id AS parentId
parent_id AS parentId,
level
FROM ma_part_type
WHERE del_flag = '0'
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'
WHERE sr.role_key = #{roleKey} AND sr.del_flag = '0'
</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>