代码规范修改提交
This commit is contained in:
parent
da293da762
commit
338f5c7fc6
|
|
@ -10,19 +10,56 @@ import org.apache.ibatis.annotations.Param;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface AppMapper {
|
public interface AppMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日领料数量
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int getDayLeaseNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
int getDayLeaseNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日退料数量
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getDayBackNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
int getDayBackNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日出库数量
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getDayInputNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
int getDayInputNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当日入库数量
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getDayOutNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
int getDayOutNum(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领料待审批数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getLeaseNum();
|
int getLeaseNum();
|
||||||
|
/**
|
||||||
|
* 退料待审批数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getBackNum();
|
int getBackNum();
|
||||||
|
/**
|
||||||
|
* 报废待审批数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getScrapNum();
|
int getScrapNum();
|
||||||
|
/**
|
||||||
|
* 试验检验待审批数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getTrialNum();
|
int getTrialNum();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,32 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface AppMenuMapper {
|
public interface AppMenuMapper {
|
||||||
|
/**
|
||||||
|
* 获取所有按钮
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<AppMenu> getAllMenu();
|
List<AppMenu> getAllMenu();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取按钮
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<AppMenu> getMenuById(Long userId);
|
List<AppMenu> getMenuById(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为用户id添加按钮
|
||||||
|
* @param appMenuId
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int addMenuById(@Param("appMenuId") Long appMenuId,@Param("userId") Long userId);
|
int addMenuById(@Param("appMenuId") Long appMenuId,@Param("userId") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为用户id删除按钮
|
||||||
|
* @param appMenuId
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int delMenuById(@Param("appMenuId") Long appMenuId, @Param("userId")Long userId);
|
int delMenuById(@Param("appMenuId") Long appMenuId, @Param("userId")Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,10 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SysNoticeMapper {
|
public interface SysNoticeMapper {
|
||||||
|
/**
|
||||||
|
* 获取通知公告
|
||||||
|
* @param keyword
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<SysNotice> getList(String keyword);
|
List<SysNotice> getList(String keyword);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,32 @@ import java.util.List;
|
||||||
* @date 2024/1/17
|
* @date 2024/1/17
|
||||||
*/
|
*/
|
||||||
public interface AppMenuService {
|
public interface AppMenuService {
|
||||||
|
/**
|
||||||
|
* 获取所有按钮
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<AppMenu> getAllMenu();
|
List<AppMenu> getAllMenu();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取按钮
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<AppMenu> getMenuById(Long userId);
|
List<AppMenu> getMenuById(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为用户id添加按钮
|
||||||
|
* @param appMenuId
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int addMenuById(Long appMenuId, Long userId);
|
int addMenuById(Long appMenuId, Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为用户id删除按钮
|
||||||
|
* @param appMenuId
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int delMenuById(Long appMenuId, Long userId);
|
int delMenuById(Long appMenuId, Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,15 @@ import com.bonus.sgzb.app.domain.ToDoList;
|
||||||
*/
|
*/
|
||||||
public interface AppService {
|
public interface AppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询关键数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
CriticalData getCriticalData();
|
CriticalData getCriticalData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询待办事项
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
ToDoList getToDoList();
|
ToDoList getToDoList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,10 @@ import java.util.List;
|
||||||
* @date 2023/12/11
|
* @date 2023/12/11
|
||||||
*/
|
*/
|
||||||
public interface SysNoticeService {
|
public interface SysNoticeService {
|
||||||
|
/**
|
||||||
|
* 获取通知公告
|
||||||
|
* @param keyword
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<SysNotice> getList(String keyword);
|
List<SysNotice> getList(String keyword);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,9 @@ public class AppServiceImpl implements AppService {
|
||||||
@Override
|
@Override
|
||||||
public CriticalData getCriticalData() {
|
public CriticalData getCriticalData() {
|
||||||
CriticalData data = new CriticalData();
|
CriticalData data = new CriticalData();
|
||||||
LocalDate current_date = LocalDate.now();
|
LocalDate currentDate = LocalDate.now();
|
||||||
String startTime = current_date + " 00:00:00";
|
String startTime = currentDate + " 00:00:00";
|
||||||
String endTime = current_date + " 23:59:59";
|
String endTime = currentDate + " 23:59:59";
|
||||||
int dayLeaseNum = mapper.getDayLeaseNum(startTime,endTime);
|
int dayLeaseNum = mapper.getDayLeaseNum(startTime,endTime);
|
||||||
int dayBackNum = mapper.getDayBackNum(startTime,endTime);
|
int dayBackNum = mapper.getDayBackNum(startTime,endTime);
|
||||||
int dayInputNum = mapper.getDayInputNum(startTime,endTime);
|
int dayInputNum = mapper.getDayInputNum(startTime,endTime);
|
||||||
|
|
|
||||||
|
|
@ -50,14 +50,16 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult submitOut(LeaseOutDetails record) {
|
public AjaxResult submitOut(LeaseOutDetails record) {
|
||||||
|
String maStatus = "15";
|
||||||
|
double outNum = 0.1;
|
||||||
if (StringUtils.isNull(record)) {
|
if (StringUtils.isNull(record)) {
|
||||||
return AjaxResult.error("领料出库失败,请检查参数是否填写完整!");
|
return AjaxResult.error("领料出库失败,请检查参数是否填写完整!");
|
||||||
}
|
}
|
||||||
String status = leaseOutDetailsMapper.getMachineStatus(record);
|
String status = leaseOutDetailsMapper.getMachineStatus(record);
|
||||||
if (status.equals("16")){
|
if (!maStatus.equals(status)){
|
||||||
return AjaxResult.error("领料出库失败,该设备不是在库状态!");
|
return AjaxResult.error("领料出库失败,该设备不是在库状态!");
|
||||||
}
|
}
|
||||||
if (record.getOutNum() == null || record.getOutNum() < 0.1) {
|
if (record.getOutNum() == null || record.getOutNum() < outNum) {
|
||||||
record.setOutNum(1.00);
|
record.setOutNum(1.00);
|
||||||
}
|
}
|
||||||
// 首先更新领料任务详情表的领料数及状态
|
// 首先更新领料任务详情表的领料数及状态
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package com.bonus.sgzb.base.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.bonus.sgzb.base.domain.*;
|
import com.bonus.sgzb.base.domain.*;
|
||||||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
|
|
@ -10,7 +10,6 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.sgzb.common.log.annotation.Log;
|
import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import com.bonus.sgzb.common.security.annotation.RequiresPermissions;
|
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -46,7 +45,6 @@ public class RepairController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 导出维修任务列表
|
* 导出维修任务列表
|
||||||
*/
|
*/
|
||||||
//@RequiresPermissions("domain:details:export")
|
|
||||||
@Log(title = "导出维修任务列表", businessType = BusinessType.EXPORT)
|
@Log(title = "导出维修任务列表", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, RepairTask bean)
|
public void export(HttpServletResponse response, RepairTask bean)
|
||||||
|
|
@ -154,7 +152,7 @@ public class RepairController extends BaseController {
|
||||||
@GetMapping("/getDicSelect")
|
@GetMapping("/getDicSelect")
|
||||||
public AjaxResult getDicSelect(@RequestParam String value)
|
public AjaxResult getDicSelect(@RequestParam String value)
|
||||||
{
|
{
|
||||||
List<dictVo> list = service.getDicSelect(value);
|
List<DictVo> list = service.getDicSelect(value);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,12 @@ public class RepairApplyRecord implements Serializable {
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;//
|
private String remark;
|
||||||
/**
|
/**
|
||||||
* 报废原因
|
* 报废原因
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "报废原因")
|
@ApiModelProperty(value = "报废原因")
|
||||||
private String scrapReason;//
|
private String scrapReason;
|
||||||
/**
|
/**
|
||||||
* 报废类型(0:自然报废,1任务报废)
|
* 报废类型(0:自然报废,1任务报废)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class RepairPartDetails {
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;//
|
private String remark;
|
||||||
/**
|
/**
|
||||||
* 维修内容
|
* 维修内容
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -65,12 +65,21 @@ public class RepairTask {
|
||||||
@ApiModelProperty(value = "维修状态")
|
@ApiModelProperty(value = "维修状态")
|
||||||
@Excel(name = "维修状态",sort = 7)
|
@Excel(name = "维修状态",sort = 7)
|
||||||
private String repairStatus;
|
private String repairStatus;
|
||||||
private String keyword;//关键字
|
/**
|
||||||
private String startTime;//开始时间
|
* 关键字
|
||||||
private String endTime;//结束时间
|
*/
|
||||||
private Long companyId;//
|
private String keyword;
|
||||||
private Long agreementId;//
|
/**
|
||||||
private String repairStatusCode;//
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private String startTime;
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private String endTime;
|
||||||
|
private Long companyId;
|
||||||
|
private Long agreementId;
|
||||||
|
private String repairStatusCode;
|
||||||
/**
|
/**
|
||||||
* 维修机具类型
|
* 维修机具类型
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,9 @@ public class RepairTaskDetails {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "维修人")
|
@ApiModelProperty(value = "维修人")
|
||||||
private String repairer;
|
private String repairer;
|
||||||
private String keyword;//关键字
|
private String keyword;
|
||||||
private String typeId;//规格ID
|
private String typeId;
|
||||||
private Long companyId;//规格ID
|
private Long companyId;
|
||||||
/**
|
/**
|
||||||
* 任务创建人
|
* 任务创建人
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,12 @@ package com.bonus.sgzb.base.domain.vo;
|
||||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
* @date 2023/12/17
|
* @date 2023/12/17
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class dictVo extends BaseEntity {
|
public class DictVo extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private Long id;
|
private Long id;
|
||||||
private String name;
|
private String name;
|
||||||
|
|
@ -4,7 +4,7 @@ import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -18,44 +18,144 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface RepairMapper {
|
public interface RepairMapper {
|
||||||
|
/**
|
||||||
|
* 获取维修任务列表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RepairTask> getRepairTaskList(RepairTask bean);
|
List<RepairTask> getRepairTaskList(RepairTask bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取维修详细列表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RepairTaskDetails> getRepairMaTypeList(RepairTaskDetails bean);
|
List<RepairTaskDetails> getRepairMaTypeList(RepairTaskDetails bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增维修记录
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int addRecord(RepairApplyRecord bean);
|
int addRecord(RepairApplyRecord bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询维修明细
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
RepairTaskDetails getById(Long id);
|
RepairTaskDetails getById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改维修数量
|
||||||
|
* @param id
|
||||||
|
* @param repairNum
|
||||||
|
* @param repairer
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int updateRepairedNum(@Param("id") Long id, @Param("repairNum")int repairNum,@Param("repairer") Long repairer,@Param("userId") Long userId);
|
int updateRepairedNum(@Param("id") Long id, @Param("repairNum")int repairNum,@Param("repairer") Long repairer,@Param("userId") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改报废数量
|
||||||
|
* @param id
|
||||||
|
* @param scrapNum
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int updateScrapNum(@Param("id")Long id, @Param("scrapNum")int scrapNum,@Param("userId")Long userId);
|
int updateScrapNum(@Param("id")Long id, @Param("scrapNum")int scrapNum,@Param("userId")Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增配件维修记录
|
||||||
|
* @param partDetails
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int addPart(RepairPartDetails partDetails);
|
int addPart(RepairPartDetails partDetails);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成维修更改维修状态
|
||||||
|
* @param ids
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int completeRepair(@Param("ids") ArrayList<Long> ids, @Param("userId")Long userId);
|
int completeRepair(@Param("ids") ArrayList<Long> ids, @Param("userId")Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询维修人员列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<SysUser> selectUserList();
|
List<SysUser> selectUserList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改维修任务状态
|
||||||
|
* @param taskList
|
||||||
|
* @param userid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int updateTaskStatus(@Param("taskList")List<RepairTask> taskList,@Param("userId") Long userid);
|
int updateTaskStatus(@Param("taskList")List<RepairTask> taskList,@Param("userId") Long userid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增任务
|
||||||
|
* @param task
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int addTask(RepairTask task);
|
int addTask(RepairTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询协议Id
|
||||||
|
* @param task
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
Long getAgreementId(RepairTask task);
|
Long getAgreementId(RepairTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增 协议与任务关联
|
||||||
|
* @param task
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int createAgreementTask(RepairTask task);
|
int createAgreementTask(RepairTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改维修数量
|
||||||
|
* @param id
|
||||||
|
* @param repairNum
|
||||||
|
* @param userid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int updateRepairedNumTwo(@Param("id")Long id, @Param("repairNum")int repairNum, @Param("userId")Long userid);
|
int updateRepairedNumTwo(@Param("id")Long id, @Param("repairNum")int repairNum, @Param("userId")Long userid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询是否存在未完成维修的
|
||||||
|
* @param task
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int getUnFinish(RepairTask task);
|
int getUnFinish(RepairTask task);
|
||||||
|
|
||||||
List<dictVo> getDicSelect(String value);
|
/**
|
||||||
|
* 根据value获取字典数据
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DictVo> getDicSelect(String value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据任务Id获取维修详细
|
||||||
|
* @param task
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RepairTaskDetails> getDetailsListByTaskId(RepairTask task);
|
List<RepairTaskDetails> getDetailsListByTaskId(RepairTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增实验建议审核数据
|
||||||
|
* @param details
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int addAuditDetails(RepairTaskDetails details);
|
int addAuditDetails(RepairTaskDetails details);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出维修任务
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@ package com.bonus.sgzb.base.service;
|
||||||
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.TreeSelect;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
|
|
||||||
|
|
@ -17,24 +16,60 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface RepairService {
|
public interface RepairService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取维修任务列表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RepairTask> getRepairTaskList(RepairTask bean);
|
List<RepairTask> getRepairTaskList(RepairTask bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取维修详细列表
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<RepairTaskDetails> getRepairMaTypeList(RepairTaskDetails bean);
|
List<RepairTaskDetails> getRepairMaTypeList(RepairTaskDetails bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增维修记录
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
AjaxResult submitRepairApply(RepairApplyRecord bean);
|
AjaxResult submitRepairApply(RepairApplyRecord bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快捷维修记录
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
AjaxResult fastRepairApply(List<RepairTaskDetails> list);
|
AjaxResult fastRepairApply(List<RepairTaskDetails> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成维修
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
int completeRepair(ArrayList<Long> ids);
|
int completeRepair(ArrayList<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询维修人员列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<SysUser> selectUserList();
|
List<SysUser> selectUserList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交审核
|
||||||
|
* @param taskList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
AjaxResult endRepairTask(List<RepairTask> taskList);
|
AjaxResult endRepairTask(List<RepairTask> taskList);
|
||||||
|
|
||||||
List<dictVo> getDicSelect(String value);
|
/**
|
||||||
|
* 根据value获取字典数据
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DictVo> getDicSelect(String value);
|
||||||
|
|
||||||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,11 @@ import com.bonus.sgzb.base.domain.RepairApplyRecord;
|
||||||
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
import com.bonus.sgzb.base.domain.RepairPartDetails;
|
||||||
import com.bonus.sgzb.base.domain.RepairTask;
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
import com.bonus.sgzb.base.domain.vo.DictVo;
|
||||||
import com.bonus.sgzb.base.mapper.RepairMapper;
|
import com.bonus.sgzb.base.mapper.RepairMapper;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.security.service.TokenService;
|
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
import com.bonus.sgzb.system.api.model.LoginUser;
|
import com.bonus.sgzb.system.api.model.LoginUser;
|
||||||
|
|
@ -17,10 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
|
|
@ -31,9 +28,6 @@ public class RepairServiceImpl implements RepairService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RepairMapper mapper;
|
private RepairMapper mapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private TokenService TokenService;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
||||||
|
|
@ -53,12 +47,14 @@ public class RepairServiceImpl implements RepairService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult submitRepairApply( RepairApplyRecord bean) {
|
public AjaxResult submitRepairApply( RepairApplyRecord bean) {
|
||||||
RepairTaskDetails details = mapper.getById(bean.getId());
|
RepairTaskDetails details = mapper.getById(bean.getId());
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
bean.setCreateBy(loginUser.getUserid());
|
bean.setCreateBy(loginUser.getUserid());
|
||||||
List<RepairPartDetails> partList = bean.getPartList();
|
List<RepairPartDetails> partList = bean.getPartList();
|
||||||
|
String nbType = "1";
|
||||||
|
String fcType = "2";
|
||||||
if (partList != null && partList.size()>0){
|
if (partList != null && partList.size()>0){
|
||||||
bean.setRepairNum(partList.get(0).getRepairNum());
|
bean.setRepairNum(partList.get(0).getRepairNum());
|
||||||
bean.setRepairer(partList.get(0).getRepairer());
|
bean.setRepairer(partList.get(0).getRepairer());
|
||||||
|
|
@ -92,9 +88,11 @@ public class RepairServiceImpl implements RepairService {
|
||||||
mapper.updateScrapNum(bean.getId(), scrapNum,loginUser.getUserid());
|
mapper.updateScrapNum(bean.getId(), scrapNum,loginUser.getUserid());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (partList != null && partList.size()>0){
|
if (partList != null && partList.size()>0){
|
||||||
if (bean.getRepairType().equals("1")){
|
if (nbType.equals(bean.getRepairType())){
|
||||||
for (RepairPartDetails partDetails : partList){
|
for (RepairPartDetails partDetails : partList){
|
||||||
if(partDetails.getPartId() != null){
|
if(partDetails.getPartId() != null){
|
||||||
if (partDetails.getPartCost() == null || partDetails.getPartCost().isEmpty()){
|
if (partDetails.getPartCost() == null || partDetails.getPartCost().isEmpty()){
|
||||||
|
|
@ -109,7 +107,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bean.getRepairType().equals("2")){
|
if (fcType.equals(bean.getRepairType())){
|
||||||
bean.setPartName(partList.get(0).getPartName());
|
bean.setPartName(partList.get(0).getPartName());
|
||||||
bean.setPartType(partList.get(0).getPartType());
|
bean.setPartType(partList.get(0).getPartType());
|
||||||
bean.setRepairContent(partList.get(0).getRepairContent());
|
bean.setRepairContent(partList.get(0).getRepairContent());
|
||||||
|
|
@ -132,7 +130,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult fastRepairApply(List<RepairTaskDetails> list) {
|
public AjaxResult fastRepairApply(List<RepairTaskDetails> list) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
for (RepairTaskDetails bean : list){
|
for (RepairTaskDetails bean : list){
|
||||||
|
|
@ -159,7 +157,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult endRepairTask(List<RepairTask> taskList) {
|
public AjaxResult endRepairTask(List<RepairTask> taskList) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
for (RepairTask task : taskList){
|
for (RepairTask task : taskList){
|
||||||
|
|
@ -187,7 +185,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<dictVo> getDicSelect(String value) {
|
public List<DictVo> getDicSelect(String value) {
|
||||||
return mapper.getDicSelect(value);
|
return mapper.getDicSelect(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
from repair_apply_details
|
from repair_apply_details
|
||||||
where task_id = #{taskId} and status = '0'
|
where task_id = #{taskId} and status = '0'
|
||||||
</select>
|
</select>
|
||||||
<select id="getDicSelect" resultType="com.bonus.sgzb.base.domain.vo.dictVo">
|
<select id="getDicSelect" resultType="com.bonus.sgzb.base.domain.vo.DictVo">
|
||||||
select s2.id,
|
select s2.id,
|
||||||
s2.name
|
s2.name
|
||||||
from sys_dic s1
|
from sys_dic s1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue