diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java index 3a59e2e9..0e5b16dd 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java @@ -47,6 +47,11 @@ public class MaMachine extends BaseEntity { */ @ApiModelProperty(value = "机具状态(数据字典)") private String maStatus; + /** + * 机具状态(数据字典) + */ + @ApiModelProperty(value = "机具状态(数据字典)名称") + private String maStatusName; /** * 二维码 */ @@ -354,4 +359,12 @@ public class MaMachine extends BaseEntity { public void setSpecificationType(String specificationType) { this.specificationType = specificationType; } + + public String getMaStatusName() { + return maStatusName; + } + + public void setMaStatusName(String maStatusName) { + this.maStatusName = maStatusName; + } } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/AppController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/AppController.java new file mode 100644 index 00000000..02f4bf21 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/AppController.java @@ -0,0 +1,42 @@ +package com.bonus.sgzb.app.controller; + +import com.bonus.sgzb.app.domain.CriticalData; +import com.bonus.sgzb.app.domain.ToDoList; +import com.bonus.sgzb.app.service.AppService; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.common.log.annotation.Log; +import com.bonus.sgzb.common.log.enums.BusinessType; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author c liu + * @date 2023/12/11 + */ +@RestController +@RequestMapping("/app") +public class AppController { + @Autowired + private AppService service; + + @ApiOperation(value = "查询关键数据") + @Log(title = "关键数据", businessType = BusinessType.QUERY) + @GetMapping("/getCriticalData") + public AjaxResult getCriticalData() + { + CriticalData data = service.getCriticalData(); + return AjaxResult.success("操作成功",data); + } + + @ApiOperation(value = "查询待办事项") + @Log(title = "待办事项", businessType = BusinessType.QUERY) + @GetMapping("/getToDoList") + public AjaxResult getToDoList() + { + ToDoList data = service.getToDoList(); + return AjaxResult.success("操作成功",data); + } +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java index 4c8584e7..8c7e2afe 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java @@ -10,12 +10,15 @@ import com.bonus.sgzb.app.service.TmTaskService; import com.bonus.sgzb.base.api.domain.LeaseApplyDetails; import com.bonus.sgzb.base.api.domain.LeaseApplyInfo; import com.bonus.sgzb.base.api.domain.TmTask; +import com.bonus.sgzb.base.domain.WarehouseKeeper; import com.bonus.sgzb.common.core.utils.DateUtils; import com.bonus.sgzb.common.core.utils.StringUtils; import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.enums.BusinessType; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -272,4 +275,13 @@ public class BackApplyController extends BaseController { } } + + @ApiOperation("退料审核列表-审核") + @Log(title = "退料审核列表-审核", businessType = BusinessType.UPDATE) + @PostMapping("/audit") + public AjaxResult audit(String id) + { + return toAjax(backApplyService.audit(id)); + } + } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/SysNoticeController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/SysNoticeController.java new file mode 100644 index 00000000..f4fce101 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/SysNoticeController.java @@ -0,0 +1,31 @@ +package com.bonus.sgzb.app.controller; + +import com.bonus.sgzb.app.domain.SysNotice; +import com.bonus.sgzb.app.service.SysNoticeService; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +@RestController +@RequestMapping("/sysNotice") +public class SysNoticeController { + @Autowired + private SysNoticeService service; + + @ApiOperation(value = "查询通知公告列表") + @GetMapping("/getList") + public AjaxResult getList() + { + List list = service.getList(); + return AjaxResult.success("操作成功",list); + } +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/CriticalData.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/CriticalData.java new file mode 100644 index 00000000..d7cc6d52 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/CriticalData.java @@ -0,0 +1,34 @@ +package com.bonus.sgzb.app.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="关键数据") +public class CriticalData { + /** + * 当日领料 + */ + @ApiModelProperty(value = "当日领料") + private int dayLeaseNum; + /** + * 当日退料 + */ + @ApiModelProperty(value = "当日退料") + private int dayBackNum; + /** + * 当日入库 + */ + @ApiModelProperty(value = "当日入库") + private int dayInputNum; + /** + * 当日出库 + */ + @ApiModelProperty(value = "当日出库") + private int dayOutNum; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/SysNotice.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/SysNotice.java new file mode 100644 index 00000000..03b369b4 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/SysNotice.java @@ -0,0 +1,65 @@ +package com.bonus.sgzb.app.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="通知公告") +public class SysNotice { + /** + * 公告ID + */ + @ApiModelProperty(value = "公告ID") + private Long noticeId; + /** + * 公告标题 + */ + @ApiModelProperty(value = "公告标题") + private String noticeTitle; + /** + * 公告类型(1通知 2公告) + */ + @ApiModelProperty(value = "公告类型(1通知 2公告)") + private String noticeType; + /** + * 公告内容 + */ + @ApiModelProperty(value = "公告内容") + private byte[] noticeContent; + private String noticeContentStr; + /** + * 公告状态(0正常 1关闭) + */ + @ApiModelProperty(value = "公告状态(0正常 1关闭)") + private String status; + /** + * 创建者 + */ + @ApiModelProperty(value = "创建者") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + /** + * 更新者 + */ + @ApiModelProperty(value = "更新者") + private String updateBy; + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/ToDoList.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/ToDoList.java new file mode 100644 index 00000000..4396498d --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/ToDoList.java @@ -0,0 +1,34 @@ +package com.bonus.sgzb.app.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="代办事项") +public class ToDoList { + /** + * 领料待审批 + */ + @ApiModelProperty(value = "领料待审批") + private int leaseNum; + /** + * 退料待审批 + */ + @ApiModelProperty(value = "退料待审批") + private int backNum; + /** + * 报废待审核 + */ + @ApiModelProperty(value = "报废待审核") + private int scrapNum; + /** + * 试验检验待审核 + */ + @ApiModelProperty(value = "试验检验待审核") + private int trialNum; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/AppMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/AppMapper.java new file mode 100644 index 00000000..6c1b53ba --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/AppMapper.java @@ -0,0 +1,28 @@ +package com.bonus.sgzb.app.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Mapper +public interface AppMapper { + + int getDayLeaseNum(@Param("startTime") String startTime, @Param("endTime")String endTime); + + int getDayBackNum(@Param("startTime") String startTime, @Param("endTime")String endTime); + + int getDayInputNum(@Param("startTime") String startTime, @Param("endTime")String endTime); + + int getDayOutNum(@Param("startTime") String startTime, @Param("endTime")String endTime); + + int getLeaseNum(); + + int getBackNum(); + + int getScrapNum(); + + int getTrialNum(); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyMapper.java index 369e5484..d9c0355c 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyMapper.java @@ -40,4 +40,6 @@ public interface BackApplyMapper { List examineList(BackApplyInfo record); List examineView(BackApplyInfo record); + + int audit(String id); } \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/SysNoticeMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/SysNoticeMapper.java new file mode 100644 index 00000000..464e96ee --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/SysNoticeMapper.java @@ -0,0 +1,15 @@ +package com.bonus.sgzb.app.mapper; + +import com.bonus.sgzb.app.domain.SysNotice; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Mapper +public interface SysNoticeMapper { + List getList(); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/AppService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/AppService.java new file mode 100644 index 00000000..b7f05cdf --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/AppService.java @@ -0,0 +1,15 @@ +package com.bonus.sgzb.app.service; + +import com.bonus.sgzb.app.domain.CriticalData; +import com.bonus.sgzb.app.domain.ToDoList; + +/** + * @author c liu + * @date 2023/12/11 + */ +public interface AppService { + + CriticalData getCriticalData(); + + ToDoList getToDoList(); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/BackApplyService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/BackApplyService.java index d68fb2ec..5cbf9735 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/BackApplyService.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/BackApplyService.java @@ -43,4 +43,6 @@ public interface BackApplyService { List examineList(BackApplyInfo record); List examineView(BackApplyInfo record); + + int audit(String id); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java new file mode 100644 index 00000000..8199bbc3 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java @@ -0,0 +1,13 @@ +package com.bonus.sgzb.app.service; + +import com.bonus.sgzb.app.domain.SysNotice; + +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +public interface SysNoticeService { + List getList(); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/AppServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/AppServiceImpl.java new file mode 100644 index 00000000..619c4700 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/AppServiceImpl.java @@ -0,0 +1,52 @@ +package com.bonus.sgzb.app.service.impl; + +import com.bonus.sgzb.app.domain.CriticalData; +import com.bonus.sgzb.app.domain.ToDoList; +import com.bonus.sgzb.app.mapper.AppMapper; +import com.bonus.sgzb.app.service.AppService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Service("AppService") +public class AppServiceImpl implements AppService { + @Autowired + private AppMapper mapper; + + + @Override + public CriticalData getCriticalData() { + CriticalData data = new CriticalData(); + LocalDate current_date = LocalDate.now(); + String startTime = current_date + " 00:00:00"; + String endTime = current_date + " 23:59:59"; + int dayLeaseNum = mapper.getDayLeaseNum(startTime,endTime); + int dayBackNum = mapper.getDayBackNum(startTime,endTime); + int dayInputNum = mapper.getDayInputNum(startTime,endTime); + int dayOutNum = mapper.getDayOutNum(startTime,endTime); + data.setDayLeaseNum(dayLeaseNum); + data.setDayBackNum(dayBackNum); + data.setDayInputNum(dayInputNum); + data.setDayOutNum(dayOutNum); + return data; + } + + @Override + public ToDoList getToDoList() { + ToDoList data = new ToDoList(); + int leaseNum = mapper.getLeaseNum(); + int backNum = mapper.getBackNum(); + int scrapNum = mapper.getScrapNum(); + int trialNum = mapper.getTrialNum(); + data.setLeaseNum(leaseNum); + data.setBackNum(backNum); + data.setScrapNum(scrapNum); + data.setTrialNum(trialNum); + return data; + } +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackApplyServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackApplyServiceImpl.java index 8f6730d8..d9ed5357 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackApplyServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/BackApplyServiceImpl.java @@ -81,4 +81,9 @@ public class BackApplyServiceImpl implements BackApplyService { return backApplyMapper.examineView(record); } + @Override + public int audit(String id) { + return backApplyMapper.audit(id); + } + } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/SysNoticeServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/SysNoticeServiceImpl.java new file mode 100644 index 00000000..07376a64 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/SysNoticeServiceImpl.java @@ -0,0 +1,30 @@ +package com.bonus.sgzb.app.service.impl; + +import com.bonus.sgzb.app.domain.SysNotice; +import com.bonus.sgzb.app.mapper.SysNoticeMapper; +import com.bonus.sgzb.app.service.SysNoticeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Base64; +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Service("SysNoticeService") +public class SysNoticeServiceImpl implements SysNoticeService { + @Autowired + private SysNoticeMapper mapper; + + @Override + public List getList() { + List list = mapper.getList(); + for (SysNotice bean : list){ + String noticeContent = Base64.getEncoder().encodeToString(bean.getNoticeContent()); + bean.setNoticeContentStr(noticeContent); + } + return list; + } +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmProjectInfoController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmProjectInfoController.java index 4b4a677d..9a0bbe10 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmProjectInfoController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmProjectInfoController.java @@ -47,6 +47,18 @@ public class BmProjectInfoController extends BaseController{ } + /** + * 获取工程项目下拉选 + */ + @ApiOperation(value = "获取工程项目下拉选") + @GetMapping("/getProjectSelect") + public AjaxResult getProjectSelect(BmProjectInfo bmProjectInfo) + { + List list = bmProjectInfoService.getProjectInfoAll(bmProjectInfo); + return AjaxResult.success(list); + + } + /** * 根据条件进行查询 */ diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmUnitInfoController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmUnitInfoController.java index 7fc479b1..124b017c 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmUnitInfoController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/BmUnitInfoController.java @@ -47,6 +47,18 @@ public class BmUnitInfoController extends BaseController{ } + /** + * 获取往来单位下拉选 + */ + @ApiOperation(value = "获取往来单位下拉选") + @GetMapping("/getUnitInfoSelect") + public AjaxResult getUnitInfoSelect(BmUnitInfo bmUnitInfo) + { + List list = bmUnitInfoService.getUnitInfoAll(bmUnitInfo); + return AjaxResult.success(list); + + } + /** * 根据条件进行查询往来单位 */ diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPartTypeController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPartTypeController.java index ab00d0a8..a0074f16 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPartTypeController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaPartTypeController.java @@ -23,7 +23,7 @@ import java.util.List; * @since 2023-11-27 16:44:02 */ @RestController -@RequestMapping("/maPartType") +@RequestMapping("maPartType") public class MaPartTypeController extends BaseController { /** * 服务对象 @@ -39,7 +39,6 @@ public class MaPartTypeController extends BaseController { @GetMapping("/list") public AjaxResult list(MaPartType maPartType) { - startPage(); List list = maPartTypeService.selectMaPartList(maPartType); return AjaxResult.success(list); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaSupplierInfoController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaSupplierInfoController.java index 1b6ac137..15d56ba6 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaSupplierInfoController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaSupplierInfoController.java @@ -51,6 +51,17 @@ public class MaSupplierInfoController extends BaseController return getDataTable(list); } + /** + * 查询供应商管理下拉选 + */ + @ApiOperation(value = "查询供应商管理下拉选") + @GetMapping("/getSupplierSelect") + public AjaxResult getSupplierSelect(MaSupplierInfo maSupplierInfo) + { + List list = maSupplierInfoService.selectMaSupplierInfoList(maSupplierInfo); + return AjaxResult.success(list); + } + /** * 导出供应商管理列表 */ diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaTypeController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaTypeController.java index e6420235..542e5fb5 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaTypeController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/MaTypeController.java @@ -46,6 +46,17 @@ public class MaTypeController extends BaseController { return AjaxResult.success(maTypeList); } + /** + * 工机具类型下拉树 + * @return 结果 + */ + @ApiOperation(value = "工机具类型下拉树") + @GetMapping("/getMaTypeSelect") + public AjaxResult getMaTypeSelect(@RequestParam(required = false, defaultValue = "", value = "typeName") String typeName, @RequestParam(required = false, defaultValue = "", value = "parentId") String parentId){ + List maTypeList = iTypeService.getMaTypeSelect(typeName, parentId); + return AjaxResult.success(maTypeList); + } + @ApiOperation(value = "获取机具设备的具体规格") @GetMapping(value = "/selectMaTypeTreeByLevel") public AjaxResult selectMaTypeTreeByLevel(@RequestParam(value = "typeId") String typeId) { @@ -53,6 +64,20 @@ public class MaTypeController extends BaseController { return AjaxResult.success(maTypeList); } + /** + * 根据左列表类型id查询右表格 + * @param typeId + * @return + */ + + @ApiOperation(value = "工器具类型") + @GetMapping("/equipmentType") + public AjaxResult equipmentType(@RequestParam(required = false) Long typeId, + @RequestParam(required = false) String typeName){ + List listByMaType = iTypeService.getEquipmentType(typeId,typeName); + return success(listByMaType); + } + /** * 获取规格层级为3的设备列表 * @return 结果 @@ -150,6 +175,19 @@ public class MaTypeController extends BaseController { */ @ApiOperation(value = "根据左列表类型id查询右表格") @GetMapping("/getListByMaType") + public AjaxResult getListByMaType(@RequestParam(required = false) Long typeId, + @RequestParam(required = false) String typeName){ + List listByMaType = iTypeService.getListByParentId(typeId,typeName); + return success(listByMaType); + } + +/* *//** + * 根据左列表类型id查询右表格 + * @param typeId + * @return + *//* + @ApiOperation(value = "根据左列表类型id查询右表格") + @GetMapping("/getListByMaType") public TableDataInfo getListByMaType(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName, @RequestParam(required = false) Integer pageSize, @@ -161,12 +199,12 @@ public class MaTypeController extends BaseController { TableDataInfo rspData = new TableDataInfo(); rspData.setTotal(listByMaType.size()); rspData.setCode(HttpStatus.SUCCESS); - listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); +// listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); rspData.setRows(listByMaType); rspData.setMsg("查询成功"); return rspData; - } + }*/ /** * 获取机具类型管理ma_type详细信息 @@ -206,8 +244,7 @@ public class MaTypeController extends BaseController { @ApiOperation(value = "删除机具类型管理ma_type") @Log(title = "机具类型管理ma_type", businessType = BusinessType.DELETE) @DeleteMapping("/{typeId}") - public AjaxResult remove(@PathVariable Long typeId) - { + public AjaxResult remove(@PathVariable Long typeId) throws Exception { return toAjax(iTypeService.deleteMaTypeByTypeId(typeId)); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java new file mode 100644 index 00000000..840311e0 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/controller/RepairController.java @@ -0,0 +1,129 @@ +package com.bonus.sgzb.base.controller; + +import cn.hutool.http.server.HttpServerRequest; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.bonus.sgzb.base.domain.*; +import com.bonus.sgzb.base.domain.vo.TreeSelect; +import com.bonus.sgzb.base.domain.vo.dictVo; +import com.bonus.sgzb.base.service.RepairService; +import com.bonus.sgzb.common.core.web.controller.BaseController; +import com.bonus.sgzb.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.common.core.web.page.TableDataInfo; +import com.bonus.sgzb.common.log.annotation.Log; +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 io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author c liu + * @date 2023/12/11 + */ +@RestController +@RequestMapping("/repair") +public class RepairController extends BaseController { + @Autowired + private RepairService service; + + /** + * 获取维修任务列表 + */ + @ApiOperation(value = "获取维修任务列表") + @Log(title = "维修任务列表", businessType = BusinessType.QUERY) + @GetMapping("/getRepairTaskList") + public TableDataInfo getRepairTaskList(RepairTask bean) + { + startPage(); + List list = service.getRepairTaskList(bean); + return getDataTable(list); + } + + /** + * 获取维修任务机具列表 + */ + @ApiOperation(value = "获取维修任务机具列表") + @Log(title = "维修任务机具列表", businessType = BusinessType.QUERY) + @GetMapping("/getRepairMaTypeList") + public TableDataInfo getRepairMaTypeList(RepairTaskDetails bean) + { + startPage(); + List list = service.getRepairMaTypeList(bean); + return getDataTable(list); + } + + /** + * 新增维修记录 + */ + @ApiOperation(value = "新增维修记录") + @Log(title = "新增维修记录", businessType = BusinessType.INSERT) + @PostMapping("/submitRepairApply") + public AjaxResult submitRepairApply(@RequestBody RepairApplyRecord bean) { + String partStrList = bean.getPartStrList(); + List repairPartDetails = JSONObject.parseArray(partStrList, RepairPartDetails.class); + bean.setPartList(repairPartDetails); + AjaxResult ajaxResult = service.submitRepairApply(bean); + return ajaxResult; + } + + /** + * 快捷维修记录 + */ + @ApiOperation(value = "快捷维修记录") + @Log(title = "快捷维修记录", businessType = BusinessType.INSERT) + @PostMapping("/fastRepairApply") + public AjaxResult fastRepairApply(@RequestBody List list) { + AjaxResult ajaxResult = service.fastRepairApply(list); + return ajaxResult; + } + + /** + * 完成维修 + */ + @ApiOperation(value = "完成维修") + @Log(title = "完成维修", businessType = BusinessType.INSERT) + @PostMapping("/completeRepair") + public AjaxResult completeRepair(@RequestBody ArrayList ids) { + return toAjax(service.completeRepair(ids)); + } + + /** + * 提交审核 + */ + @ApiOperation(value = "提交审核") + @Log(title = "提交审核", businessType = BusinessType.INSERT) + @PostMapping("/endRepairTask") + public AjaxResult endRepairTask(@RequestBody ArrayList taskList) { + return service.endRepairTask(taskList); + } + + /** + * 获取用户下拉选 + */ + @GetMapping("/getUserSelect") + public AjaxResult getUserSelect() + { + List list = service.selectUserList(); + return AjaxResult.success(list); + } + + /** + * 字典下拉选 + */ + @GetMapping("/getDicSelect") + public AjaxResult getDicSelect(@RequestParam String value) + { + List list = service.getDicSelect(value); + return AjaxResult.success(list); + } + + +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairApplyRecord.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairApplyRecord.java new file mode 100644 index 00000000..5e3d2aae --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairApplyRecord.java @@ -0,0 +1,128 @@ +package com.bonus.sgzb.base.domain; + +import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="维修任务详细") +public class RepairApplyRecord implements Serializable { + private static final long serialVersionUID = 1L; + private Long id; + /** + * 任务ID + */ + @ApiModelProperty(value = "任务ID") + private String taskId; + /** + * 机具ID + */ + @ApiModelProperty(value = "机具ID") + private String maId; + /** + * 规格ID + */ + @ApiModelProperty(value = "规格ID") + private String typeId; + /** + * 维修数量 + */ + @ApiModelProperty(value = "维修数量") + private int repairNum; + /** + * 报废数量 + */ + @ApiModelProperty(value = "报废数量") + private int scrapNum; + /** + * 维修方式(1内部2返厂3报废) + */ + @ApiModelProperty(value = "维修方式(1内部2返厂3报废)") + private String repairType; + /** + * 创建者 + */ + @ApiModelProperty(value = "创建者") + private Long createBy; + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + /** + * 更新者 + */ + @ApiModelProperty(value = "更新者") + private String updateBy; + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark;// + /** + * 报废原因 + */ + @ApiModelProperty(value = "报废原因") + private String scrapReason;// + /** + * 报废类型(0:自然报废,1任务报废) + */ + @ApiModelProperty(value = "报废类型(0:自然报废,1任务报废)") + private String scrapType; + /** + * 返厂id + */ + @ApiModelProperty(value = "返厂id") + private String supplierId; + /** + * 配件数量 + */ + @ApiModelProperty(value = "配件数量") + private int partNum; + /** + * 配件单价 + */ + @ApiModelProperty(value = "配件单价") + private String partPrice; + /** + * 维修内容 + */ + @ApiModelProperty(value = "维修内容") + private String repairContent; + /** + * 类型(0不收费,1收费) + */ + @ApiModelProperty(value = "类型(0不收费,1收费)") + private String partType; + /** + * 配件名称 + */ + @ApiModelProperty(value = "配件名称") + private String partName; + /** + * 维修人 + */ + @ApiModelProperty(value = "维修人") + private Long repairer; + private List partList; + private String partStrList; + private Long companyId; + /** + * 损坏照片id + */ + @ApiModelProperty(value = "损坏照片id") + private String fileIds; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairPartDetails.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairPartDetails.java new file mode 100644 index 00000000..90e4a6ce --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairPartDetails.java @@ -0,0 +1,98 @@ +package com.bonus.sgzb.base.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="维修配件") +public class RepairPartDetails { + /** + * 任务ID + */ + @ApiModelProperty(value = "任务ID") + private String taskId; + /** + * 机具ID + */ + @ApiModelProperty(value = "机具ID") + private String maId; + /** + * 规格ID + */ + @ApiModelProperty(value = "规格ID") + private String typeId; + /** + * 配件ID + */ + @ApiModelProperty(value = "配件ID") + private Long partId; + /** + * 配件名称 + */ + @ApiModelProperty(value = "配件名称") + private String partName; + /** + * 返厂id + */ + @ApiModelProperty(value = "返厂id") + private String supplierId; + /** + * 配件数量 + */ + @ApiModelProperty(value = "配件数量") + private int partNum; + /** + * 配件费用 + */ + @ApiModelProperty(value = "配件费用") + private String partCost; + /** + * 配件单价 + */ + @ApiModelProperty(value = "配件单价") + private String partPrice; + /** + * 类型(0不收费,1收费) + */ + @ApiModelProperty(value = "类型(0不收费,1收费)") + private String partType; + /** + * 创建者 + */ + @ApiModelProperty(value = "创建者") + private Long createBy; + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + /** + * 更新者 + */ + @ApiModelProperty(value = "更新者") + private String updateBy; + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark;// + /** + * 维修内容 + */ + @ApiModelProperty(value = "维修内容") + private String repairContent; + private Long companyId; + private Long repairer; + @ApiModelProperty(value = "维修数量") + private int repairNum; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairTask.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairTask.java new file mode 100644 index 00000000..6e0c7104 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairTask.java @@ -0,0 +1,70 @@ +package com.bonus.sgzb.base.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="维修任务") +public class RepairTask { + /** + * 任务id + */ + @ApiModelProperty(value = "任务id") + private String taskId; + /** + * 维修单号 + */ + @ApiModelProperty(value = "维修单号") + private String repairCode; + /** + * 退料单位名称 + */ + @ApiModelProperty(value = "退料单位名称") + private String backUnit; + /** + * 退料工程名称 + */ + @ApiModelProperty(value = "退料工程名称") + private String backPro; + /** + * 维修机具类型 + */ + @ApiModelProperty(value = "维修机具类型") + private String type; + /** + * 任务创建人 + */ + @ApiModelProperty(value = "任务创建人") + private Long createBy; + /** + * 任务创建人 + */ + @ApiModelProperty(value = "任务创建人") + private String createUser; + + /** + * 任务创建时间 + */ + @ApiModelProperty(value = "任务创建时间") + private String createTime; + /** + * 退料单号 + */ + @ApiModelProperty(value = "退料单号") + private String backCode; + /** + * 维修状态 + */ + @ApiModelProperty(value = "维修状态") + private String repairStatus; + private String keyword;//关键字 + private String startTime;//开始时间 + private String endTime;//结束时间 + private String companyId;// + private Long agreementId;// +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairTaskDetails.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairTaskDetails.java new file mode 100644 index 00000000..a59c0f38 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/RepairTaskDetails.java @@ -0,0 +1,83 @@ +package com.bonus.sgzb.base.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Data +@ApiModel(value="维修任务明细") +public class RepairTaskDetails { + /** + * id + */ + @ApiModelProperty(value = "id") + private Long id; + /** + * 任务ID + */ + @ApiModelProperty(value = "任务ID") + private String taskId; + /** + * 机具ID + */ + @ApiModelProperty(value = "机具ID") + private String maId; + /** + * 类型名称 + */ + @ApiModelProperty(value = "类型名称") + private String typeName; + /** + * 规格型号 + */ + @ApiModelProperty(value = "规格型号") + private String type; + /** + * 编码 + */ + @ApiModelProperty(value = "编码") + private String code; + /** + * 维修总量 + */ + @ApiModelProperty(value = "维修总量") + private int repairNum; + /** + * 维修合格数量 + */ + @ApiModelProperty(value = "维修合格数量") + private int repairedNum; + /** + * 维修报废数量 + */ + @ApiModelProperty(value = "维修报废数量") + private int scrapNum; + /** + * 待修状态 + */ + @ApiModelProperty(value = "待修状态") + private String status; + /** + * 更新者 + */ + @ApiModelProperty(value = "更新者") + private String updateBy; + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + /** + * 维修人 + */ + @ApiModelProperty(value = "维修人") + private String repairer; + private String keyword;//关键字 + private String typeId;//规格ID + private Long companyId;//规格ID + +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/dictVo.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/dictVo.java new file mode 100644 index 00000000..e5b232ab --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/vo/dictVo.java @@ -0,0 +1,17 @@ +package com.bonus.sgzb.base.domain.vo; + +import com.bonus.sgzb.common.core.web.domain.BaseEntity; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author c liu + * @date 2023/12/17 + */ +@Data +public class dictVo extends BaseEntity { + private static final long serialVersionUID = 1L; + private Long id; + private String name; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaTypeMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaTypeMapper.java index 3762224e..b659a772 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaTypeMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/MaTypeMapper.java @@ -74,4 +74,5 @@ public interface MaTypeMapper { List selectMaTypeListByLevelNotFour(String parentId); + List getMaTypeSelect(String parentId); } \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/RepairMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/RepairMapper.java new file mode 100644 index 00000000..3333ab68 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/mapper/RepairMapper.java @@ -0,0 +1,55 @@ +package com.bonus.sgzb.base.mapper; + +import com.bonus.sgzb.base.domain.RepairApplyRecord; +import com.bonus.sgzb.base.domain.RepairPartDetails; +import com.bonus.sgzb.base.domain.RepairTask; +import com.bonus.sgzb.base.domain.RepairTaskDetails; +import com.bonus.sgzb.base.domain.vo.dictVo; +import com.bonus.sgzb.system.api.domain.SysUser; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Mapper +public interface RepairMapper { + + List getRepairTaskList(RepairTask bean); + + List getRepairMaTypeList(RepairTaskDetails bean); + + + int addRecord(RepairApplyRecord bean); + + RepairTaskDetails getById(Long id); + + int updateRepairedNum(@Param("id") Long id, @Param("repairNum")int repairNum,@Param("repairer") Long repairer,@Param("userId") Long userId); + + int updateScrapNum(@Param("id")Long id, @Param("scrapNum")int scrapNum,@Param("userId")Long userId); + + int addPart(RepairPartDetails partDetails); + + int completeRepair(@Param("ids") ArrayList ids, @Param("userId")Long userId); + + List selectUserList(); + + int updateTaskStatus(@Param("taskList")List taskList,@Param("userId") Long userid); + + int addTask(RepairTask task); + + Long getAgreementId(RepairTask task); + + int createAgreementTask(RepairTask task); + + int updateRepairedNumTwo(@Param("id")Long id, @Param("repairNum")int repairNum, @Param("userId")Long userid); + + + int getUnFinish(RepairTask task); + + List getDicSelect(String value); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ITypeService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ITypeService.java index 2e476f2b..6e662b89 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ITypeService.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/ITypeService.java @@ -11,6 +11,7 @@ import java.util.List; public interface ITypeService { List getMaTypeList(String typeName, String parentId); + List getMaTypeSelect(String typeName, String parentId); List getListByMaType(Long typeId,String typeName); @@ -45,7 +46,7 @@ public interface ITypeService { * @param typeId 机具类型管理ma_type主键 * @return 结果 */ - public int deleteMaTypeByTypeId(Long typeId); + public int deleteMaTypeByTypeId(Long typeId) throws Exception; /** * 构建前端所需要树结构 @@ -67,4 +68,6 @@ public interface ITypeService { List getListByParentId(Long typeId, String typeName); List getEquipmentType(Long typeId, String typeName); + + } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/RepairService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/RepairService.java new file mode 100644 index 00000000..296b86b8 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/RepairService.java @@ -0,0 +1,38 @@ +package com.bonus.sgzb.base.service; + +import com.bonus.sgzb.base.domain.RepairApplyRecord; +import com.bonus.sgzb.base.domain.RepairTask; +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.common.core.web.domain.AjaxResult; +import com.bonus.sgzb.system.api.domain.SysUser; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author c liu + * @date 2023/12/11 + */ +public interface RepairService { + + + List getRepairTaskList(RepairTask bean); + + + List getRepairMaTypeList(RepairTaskDetails bean); + + AjaxResult submitRepairApply(RepairApplyRecord bean); + + + AjaxResult fastRepairApply(List list); + + int completeRepair(ArrayList ids); + + List selectUserList(); + + AjaxResult endRepairTask(List taskList); + + List getDicSelect(String value); +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java index d1322b2d..b52d6306 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaMachineServiceImpl.java @@ -22,12 +22,7 @@ public class MaMachineServiceImpl implements MaMachineService { @Override public List getMaMachine(MaMachine maMachine) { - List maMachineList = maMachineMapper.getMaMachine(maMachine); - for (MaMachine machine : maMachineList) { - // 添加查询物品种类,设备类型,规格型号 - getType(machine); - } - return maMachineList; + return maMachineMapper.getMaMachine(maMachine); } /** diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java index 4ca3042d..f8348c2d 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java @@ -48,23 +48,31 @@ public class MaTypeServiceImpl implements ITypeService { @Override @Transactional public int insertMaType(MaType maType) { + Long parentId = maType.getParentId(); + MaType maType1 = maTypeMapper.selectMaTypeByTypeId(parentId); + String level = maType1.getLevel(); + maType.setLevel(String.valueOf(Integer.parseInt(level) + 1)); maType.setCreateTime(DateUtils.getNowDate()); int i = maTypeMapper.insertType(maType); Long typeId = maType.getTypeId(); // 图片路径保存 - MaTypeFile typeFile = new MaTypeFile(); - typeFile.setTypeId(typeId); - typeFile.setFileName(maType.getPhotoName()); - typeFile.setFileUrl(maType.getPhotoUrl()); - typeFile.setFileType(""); - typeFileMapper.insertMaTypeFile(typeFile); + if (StringUtils.isNotEmpty(maType.getPhotoName()) && StringUtils.isNotEmpty(maType.getPhotoUrl())) { + MaTypeFile typeFile = new MaTypeFile(); + typeFile.setTypeId(typeId); + typeFile.setFileName(maType.getPhotoName()); + typeFile.setFileUrl(maType.getPhotoUrl()); + typeFile.setFileType(""); + typeFileMapper.insertMaTypeFile(typeFile); + } // 文档路径保存 - MaTypeFile typeFile1 = new MaTypeFile(); - typeFile1.setTypeId(typeId); - typeFile1.setFileName(maType.getDocumentName()); - typeFile1.setFileUrl(maType.getDocumentUrl()); - typeFile1.setFileType(""); - typeFileMapper.insertMaTypeFile(typeFile1); + if (StringUtils.isNotEmpty(maType.getDocumentName()) && StringUtils.isNotEmpty(maType.getDocumentUrl())) { + MaTypeFile typeFile1 = new MaTypeFile(); + typeFile1.setTypeId(typeId); + typeFile1.setFileName(maType.getDocumentName()); + typeFile1.setFileUrl(maType.getDocumentUrl()); + typeFile1.setFileType(""); + typeFileMapper.insertMaTypeFile(typeFile1); + } // 库管员配置 MaTypeKeeper typeKeeper = new MaTypeKeeper(); typeKeeper.setUserId(maType.getKeeperUserId()); @@ -145,7 +153,11 @@ public class MaTypeServiceImpl implements ITypeService { * @return 结果 */ @Override - public int deleteMaTypeByTypeId(Long typeId) { + public int deleteMaTypeByTypeId(Long typeId) throws Exception { + List listByParentId = maTypeMapper.getListByParentId(typeId, ""); + if (listByParentId.size() > 0) { + throw new Exception("子级类型不为空!!!"); + } return maTypeMapper.deleteTypeById(typeId); } @@ -157,6 +169,16 @@ public class MaTypeServiceImpl implements ITypeService { return treeSelectList; } + @Override + public List getMaTypeSelect(String typeName, String parentId) { + List maTypes = maTypeMapper.getMaTypeSelect(parentId); + List treeSelectList = buildDeptTreeSelect(maTypes); + //如果没有查询到那么返回空 + return treeSelectList; + } + + + /** * 根据左列表类型id查询右表格 * diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java new file mode 100644 index 00000000..f537380c --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/RepairServiceImpl.java @@ -0,0 +1,189 @@ +package com.bonus.sgzb.base.service.impl; + +import cn.hutool.http.server.HttpServerRequest; +import com.bonus.sgzb.base.domain.RepairApplyRecord; +import com.bonus.sgzb.base.domain.RepairPartDetails; +import com.bonus.sgzb.base.domain.RepairTask; +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.mapper.RepairMapper; +import com.bonus.sgzb.base.service.RepairService; +import com.bonus.sgzb.common.core.constant.TokenConstants; +import com.bonus.sgzb.common.core.utils.SpringUtils; +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.system.api.domain.SysUser; +import com.bonus.sgzb.system.api.model.LoginUser; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author c liu + * @date 2023/12/11 + */ +@Service("RepairService") +public class RepairServiceImpl implements RepairService { + @Autowired + private RepairMapper mapper; + + @Resource + private TokenService TokenService; + + + @Override + public List getRepairTaskList(RepairTask bean) { + List repairTaskList = mapper.getRepairTaskList(bean); + return repairTaskList; + } + + @Override + public List getRepairMaTypeList(RepairTaskDetails bean) { + List repairMaTypeList = mapper.getRepairMaTypeList(bean); + return repairMaTypeList; + } + + @Override + @Transactional + public AjaxResult submitRepairApply( RepairApplyRecord bean) { + RepairTaskDetails details = mapper.getById(bean.getId()); + LoginUser loginUser = SecurityUtils.getLoginUser(); + bean.setCreateBy(loginUser.getUserid()); + List partList = bean.getPartList(); + if (partList != null && partList.size()>0){ + bean.setRepairNum(partList.get(0).getRepairNum()); + bean.setRepairer(partList.get(0).getRepairer()); + } + switch (bean.getRepairType()) { + case "1":{ + int repairNum = details.getRepairedNum() + bean.getRepairNum(); + int num = repairNum + details.getScrapNum(); + if (num > details.getRepairNum()) { + return AjaxResult.error("维修数量大于维修总量"); + } + mapper.updateRepairedNum(bean.getId(), repairNum,bean.getRepairer(),loginUser.getUserid()); + break; + } + case "2": { + int repairNum = details.getRepairedNum() + bean.getRepairNum(); + int num = repairNum + details.getScrapNum(); + if (num > details.getRepairNum()) { + return AjaxResult.error("维修数量大于维修总量"); + } + mapper.updateRepairedNumTwo(bean.getId(), repairNum,loginUser.getUserid()); + break; + } + case "3": { + int scrapNum = details.getScrapNum() + bean.getScrapNum(); + int num = scrapNum + details.getRepairedNum(); + if (num > details.getRepairNum()) { + return AjaxResult.error("维修数量大于维修总量"); + //添加维修记录 + } + mapper.updateScrapNum(bean.getId(), scrapNum,loginUser.getUserid()); + break; + } + } + if (partList != null && partList.size()>0){ + for (RepairPartDetails partDetails : partList){ + if (partDetails.getPartId() == null && bean.getRepairType().equals("1")){ + return AjaxResult.error("请选择配件"); + } + if (bean.getRepairType().equals("1")){ + partDetails.setTaskId(bean.getTaskId()); + partDetails.setMaId(bean.getMaId()); + partDetails.setTypeId(bean.getTypeId()); + partDetails.setCreateBy(loginUser.getUserid()); + partDetails.setCompanyId(bean.getCompanyId()); + mapper.addPart(partDetails); + } + } + if (bean.getRepairType().equals("2")){ + bean.setPartName(partList.get(0).getPartName()); + bean.setPartType(partList.get(0).getPartType()); + bean.setRepairContent(partList.get(0).getRepairContent()); + bean.setSupplierId(partList.get(0).getSupplierId()); + bean.setPartPrice(partList.get(0).getPartPrice()); + bean.setPartNum(partList.get(0).getPartNum()); + } + + } + mapper.addRecord(bean); + return AjaxResult.success(); + } + + @Override + @Transactional + public AjaxResult fastRepairApply(List list) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + for (RepairTaskDetails bean : list){ + int repairedNum = bean.getRepairNum() - bean.getRepairedNum() - bean.getScrapNum(); + if (repairedNum <= 0){ + return AjaxResult.error("选中的数据中包含待维修数量为0的机具,请重新选择"); + } + } + for (RepairTaskDetails bean : list){ + int repairedNum = bean.getRepairNum() - bean.getRepairedNum() - bean.getScrapNum(); + RepairApplyRecord partDetails = new RepairApplyRecord(); + partDetails.setTaskId(bean.getTaskId()); + partDetails.setMaId(bean.getMaId()); + partDetails.setTypeId(bean.getTypeId()); + partDetails.setRepairNum(repairedNum); + partDetails.setRepairType("1"); + partDetails.setCreateBy(loginUser.getUserid()); + partDetails.setCompanyId(bean.getCompanyId()); + mapper.addRecord(partDetails); + int i = repairedNum + bean.getRepairedNum(); + mapper.updateRepairedNumTwo(bean.getId(),i,loginUser.getUserid()); + } + return AjaxResult.success(); + } + + @Override + @Transactional + public AjaxResult endRepairTask(List taskList) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + for (RepairTask task : taskList){ + int i = mapper.getUnFinish(task); + if (i > 0){ + return AjaxResult.error("选中的数据中包含维修未完成的,请完成维修再进行审核"); + } + } + int i = mapper.updateTaskStatus(taskList,loginUser.getUserid()); + for (RepairTask task : taskList){ + task.setCreateBy(loginUser.getUserid()); + Long agreementId = mapper.getAgreementId(task); + mapper.addTask(task); + task.setAgreementId(agreementId); + mapper.createAgreementTask(task); + } + return AjaxResult.success(); + } + + @Override + public List getDicSelect(String value) { + return mapper.getDicSelect(value); + } + + @Override + public int completeRepair(ArrayList ids) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + return mapper.completeRepair(ids,loginUser.getUserid()); + } + + @Override + public List selectUserList() { + return mapper.selectUserList(); + } + + + + +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java index 9b7b34d7..1d0162d5 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java @@ -76,7 +76,6 @@ public class CommonUtil { valueList.add(0); return valueList; } - ; BigDecimal numberValue = new BigDecimal(new Double(0).toString()); BigDecimal countValue = new BigDecimal(new Double(0).toString()); for (int i = 0; i < list.size(); i++) { diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/AppMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/AppMapper.xml new file mode 100644 index 00000000..a0e88288 --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/AppMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml index 39b0de21..f067c8a7 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml @@ -268,7 +268,10 @@ NOW() ) - + + UPDATE tm_task SET task_status = 38 WHERE task_id = #{id} + + DELETE FROM back_apply_info WHERE id = #{id} diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/SysNoticeMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/SysNoticeMapper.xml new file mode 100644 index 00000000..a98186fd --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/SysNoticeMapper.xml @@ -0,0 +1,19 @@ + + + + + + + diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml index 8372e64b..3d49ec35 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineMapper.xml @@ -37,11 +37,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -276,7 +215,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml index ab00fb8b..690526b4 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaMachineTypeMapper.xml @@ -289,8 +289,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" m.holding_time, m.warn_num, m.del_flag, m.create_by, m.create_time, m.remark, m.company_id from ma_type m + where level != 4 and m.status = '0' and del_flag = '0' + + @@ -308,7 +316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join (select * from ma_type_file where file_type = '2') mtf2 on m.type_id = mtf2.type_id left join ma_type_keeper mtk on mtf.type_id = mtk.type_id left join sys_user su on mtk.user_id = su.user_id - where m.parent_id = #{typeId} and m.status = '0' + where m.parent_id = #{typeId} and m.status = '0' and m.del_flag = '0' AND type_name like concat('%',#{typeName},'%') @@ -338,4 +346,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaSupplierInfoMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaSupplierInfoMapper.xml index 86747242..b68ca5ee 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaSupplierInfoMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaSupplierInfoMapper.xml @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + SELECT + rd.task_id, + tt.CODE AS repairCode, + bui.unit_name AS backUnit, + bpi.pro_name AS backPro, + su.user_name AS createUser, + tt.create_time AS createTime, + bai.CODE AS backCode, + sd.name AS repairStatus, + tt.company_id AS companyId, + GROUP_CONCAT(DISTINCT mt2.type_name) as type + FROM + repair_apply_details rd + LEFT JOIN ma_type mt on rd.type_id = mt.type_id + LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id + LEFT JOIN tm_task tt on rd.task_id = tt.task_id + LEFT JOIN back_apply_info bai ON rd.back_id = bai.id + LEFT JOIN tm_task_agreement tta ON bai.task_id = tta.task_id + LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id + LEFT JOIN bm_unit_info bui ON bai2.unit_id = bui.unit_id + LEFT JOIN bm_project_info bpi ON bai2.project_id = bpi.pro_id + left join sys_user su on rd.create_by = su.user_id + left join sys_dic sd on sd.id = tt.task_status + where 1=1 + + AND (locate(#{keyword}, su.user_name) > 0 + or locate(#{keyword}, tt.CODE) > 0) + + + AND bui.unit_id = #{backUnit} + + + AND bpi.pro_id = #{backPro} + + + AND mt2.type_id = #{type} + + + AND locate(#{backCode}, bai.CODE) > 0 + + + AND tt.task_status = #{repairStatus} + + + AND ts.create_time between #{startTime} and #{endTime} + + GROUP BY rd.task_id,bui.unit_name,bpi.pro_name,bai.code,su.user_name + + + + + + + + + + + diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java new file mode 100644 index 00000000..7bf076dd --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java @@ -0,0 +1,37 @@ +package com.bonus.sgzb.material.controller; + +import com.bonus.sgzb.common.core.web.controller.BaseController; +import com.bonus.sgzb.common.core.web.page.TableDataInfo; +import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo; +import com.bonus.sgzb.material.service.ReturnOfMaterialsInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.bonus.sgzb.material.domain.AgreementInfo; +import java.util.List; + +/** + * @author lsun + */ +@Api(tags = " 退料入库") +@RestController +@RequestMapping("/returnOfMaterialsInfo") +public class ReturnOfMaterialsInfoController extends BaseController { + @Autowired + private ReturnOfMaterialsInfoService returnOfMaterialsInfoService; + + /** + * 获取协议管理列表 + */ + @ApiOperation(value = "获取协议管理列表") + @GetMapping("/getReturnOfMaterialsInfoAll") + public TableDataInfo getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean) + { + startPage(); + List list = returnOfMaterialsInfoService.getReturnOfMaterialsInfoAll(bean); + return getDataTable(list); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java new file mode 100644 index 00000000..c33984b2 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java @@ -0,0 +1,64 @@ +package com.bonus.sgzb.material.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author lsun + * 退料入库 + */ +@Data +public class ReturnOfMaterialsInfo { + + + @ApiModelProperty(value = "id") + private Long id; + + /** 退料单号 */ + @ApiModelProperty(value = "退料单号") + private String code; + + /** 退料单位 */ + @ApiModelProperty(value = "退料单位") + private String unitName; + + /** 退料工程 */ + @ApiModelProperty(value = "退料工程") + private String lotName; + + + @ApiModelProperty(value = "机具id") + private Long kindId; + @ApiModelProperty(value = "机具名称") + private String kindName; + @ApiModelProperty(value = "类型id") + private Long typeId; + @ApiModelProperty(value = "类型ids") + private String typeIds; + @ApiModelProperty(value = "类型名称") + private String typeName; + @ApiModelProperty(value = "规格型号id") + private Long modelId; + @ApiModelProperty(value = "规格型号") + private String modelName; + + + @ApiModelProperty(value = "入库数量") + private String inputNum; + + @ApiModelProperty(value = "编号") + private String maCode; + + @ApiModelProperty(value = "退料时间") + private String returnTime; + + @ApiModelProperty(value = "提交入库时间") + private String submitStorageTime; + + @ApiModelProperty(value = "提交入库人员") + private String submitToStoragePersonnel; + + @ApiModelProperty(value = "备注") + private String remark; + +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java new file mode 100644 index 00000000..7d941cab --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java @@ -0,0 +1,17 @@ +package com.bonus.sgzb.material.mapper; + + +import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + + +/** + * @author lsun + */ +@Mapper +public interface ReturnOfMaterialsInfoMapper { + + List getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java new file mode 100644 index 00000000..6912da12 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java @@ -0,0 +1,14 @@ +package com.bonus.sgzb.material.service; + + +import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo; + +import java.util.List; + +/** + * @author lsun + */ +public interface ReturnOfMaterialsInfoService { + + List getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java index 88886139..9e824bba 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java @@ -15,7 +15,6 @@ import com.bonus.sgzb.material.service.IPurchaseCheckInfoService; import com.bonus.sgzb.common.core.utils.DateUtils; import com.bonus.sgzb.material.vo.NoticeInfoVO; import com.bonus.sgzb.system.api.RemoteUserService; -import javafx.concurrent.Task; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java new file mode 100644 index 00000000..afe61f02 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java @@ -0,0 +1,24 @@ +package com.bonus.sgzb.material.service.impl; + +import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo; +import com.bonus.sgzb.material.mapper.ReturnOfMaterialsInfoMapper; +import com.bonus.sgzb.material.service.ReturnOfMaterialsInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author lsun + */ +@Service +public class ReturnOfMaterialsInfoServiceImpl implements ReturnOfMaterialsInfoService { + + @Autowired + private ReturnOfMaterialsInfoMapper returnOfMaterialsInfoMapper; + + @Override + public List getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean) { + return returnOfMaterialsInfoMapper.getReturnOfMaterialsInfoAll(bean); + } +} diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml new file mode 100644 index 00000000..830f1d68 --- /dev/null +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file