工机具管理-库管员配置;维修班配置

This commit is contained in:
sliang 2023-12-18 21:26:40 +08:00
parent 8fa742fb8c
commit 9d5ca4a462
22 changed files with 109 additions and 32 deletions

View File

@ -29,11 +29,11 @@ public class MaintenanceGangController extends BaseController {
* 获取维修班配置列表 * 获取维修班配置列表
*/ */
@ApiOperation(value = "获取维修班配置列表") @ApiOperation(value = "获取维修班配置列表")
@GetMapping("/warehouseKeeperInfoAll") @GetMapping("/maintenanceGangInfoAll")
public TableDataInfo getWarehouseKeeperInfoAll(MaintenanceGang bean) public TableDataInfo getMaintenanceGangInfoAll(MaintenanceGang bean)
{ {
startPage(); startPage();
List<MaintenanceGang> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean); List<MaintenanceGang> list = warehouseKeeperService.getMaintenanceGangInfoAll(bean);
return getDataTable(list); return getDataTable(list);
} }
@ -61,8 +61,8 @@ public class MaintenanceGangController extends BaseController {
*/ */
@ApiOperation(value = "维修班配置-删除") @ApiOperation(value = "维修班配置-删除")
@PostMapping("/remove") @PostMapping("/remove")
public AjaxResult remove(String typeId,String type) public AjaxResult remove(@Validated @RequestBody MaintenanceGang bean)
{ {
return toAjax(warehouseKeeperService.deleteByIds(typeId,type)); return toAjax(warehouseKeeperService.deleteByIds(bean));
} }
} }

View File

@ -62,9 +62,9 @@ public class WarehouseKeeperController extends BaseController {
*/ */
@ApiOperation(value = "库管员配置-删除") @ApiOperation(value = "库管员配置-删除")
@PostMapping("/remove") @PostMapping("/remove")
public AjaxResult remove(String typeId,String type) public AjaxResult remove(@Validated @RequestBody WarehouseKeeper bean )
{ {
return toAjax(warehouseKeeperService.deleteByIds(typeId,type)); return toAjax(warehouseKeeperService.deleteByIds(bean));
} }
} }

View File

@ -43,4 +43,7 @@ public class MaintenanceGang extends BaseEntity {
@ApiModelProperty(value = "数据所属组织") @ApiModelProperty(value = "数据所属组织")
private Long companyId; private Long companyId;
@ApiModelProperty(value = "删除类型1单个 2多个")
private String type;
} }

View File

@ -43,4 +43,8 @@ public class WarehouseKeeper extends BaseEntity {
@ApiModelProperty(value = "数据所属组织") @ApiModelProperty(value = "数据所属组织")
private Long companyId; private Long companyId;
@ApiModelProperty(value = "删除类型1单个 2多个")
private String type;
} }

View File

@ -10,7 +10,7 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface MaintenanceGangMapper { public interface MaintenanceGangMapper {
List<MaintenanceGang> getWarehouseKeeperInfoAll(MaintenanceGang bean); List<MaintenanceGang> getMaintenanceGangInfoAll(MaintenanceGang bean);
List<MaintenanceGang> getMaUserList(String userName); List<MaintenanceGang> getMaUserList(String userName);

View File

@ -8,11 +8,11 @@ import java.util.List;
* @author lsun * @author lsun
*/ */
public interface MaintenanceGangService { public interface MaintenanceGangService {
List<MaintenanceGang> getWarehouseKeeperInfoAll(MaintenanceGang bean); List<MaintenanceGang> getMaintenanceGangInfoAll(MaintenanceGang bean);
List<MaintenanceGang> getMaUserList (String userName); List<MaintenanceGang> getMaUserList (String userName);
int add(MaintenanceGang bean); int add(MaintenanceGang bean);
int deleteByIds(String typeId,String type); int deleteByIds(MaintenanceGang bean);
} }

View File

@ -14,5 +14,5 @@ public interface WarehouseKeeperService {
int add(WarehouseKeeper bean); int add(WarehouseKeeper bean);
int deleteByIds(String typeId,String type); int deleteByIds(WarehouseKeeper bean);
} }

View File

@ -20,8 +20,8 @@ public class MaintenanceGangServiceImpl implements MaintenanceGangService {
private MaintenanceGangMapper MaintenanceGangMapper; private MaintenanceGangMapper MaintenanceGangMapper;
@Override @Override
public List<MaintenanceGang> getWarehouseKeeperInfoAll(MaintenanceGang bean) { public List<MaintenanceGang> getMaintenanceGangInfoAll(MaintenanceGang bean) {
return MaintenanceGangMapper.getWarehouseKeeperInfoAll(bean); return MaintenanceGangMapper.getMaintenanceGangInfoAll(bean);
} }
@Override @Override
@ -55,15 +55,15 @@ public class MaintenanceGangServiceImpl implements MaintenanceGangService {
} }
@Override @Override
public int deleteByIds(String typeId,String type) { public int deleteByIds(MaintenanceGang bean) {
int i = 0; int i = 0;
if(StringHelper.isNotEmpty(type)){ if(StringHelper.isNotEmpty(bean.getType())){
if("1".equals(type)){ if("1".equals(bean.getType())){
i = MaintenanceGangMapper.deleteByIds(typeId); i = MaintenanceGangMapper.deleteByIds(bean.getTypeIds());
}else{ }else{
if(StringHelper.isNotEmpty(typeId)){ if(StringHelper.isNotEmpty(bean.getTypeIds())){
List<MaintenanceGang> list = new ArrayList<>(); List<MaintenanceGang> list = new ArrayList<>();
String[] splitTypeIds = typeId.split("@"); String[] splitTypeIds = bean.getTypeIds().split("@");
i = MaintenanceGangMapper.deleteByIdsAll(splitTypeIds); i = MaintenanceGangMapper.deleteByIdsAll(splitTypeIds);
} }
} }

View File

@ -57,15 +57,15 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
} }
@Override @Override
public int deleteByIds(String typeId,String type) { public int deleteByIds(WarehouseKeeper bean) {
int i = 0; int i = 0;
if(StringHelper.isNotEmpty(type)){ if(StringHelper.isNotEmpty(bean.getType())){
if("1".equals(type)){ if("1".equals(bean.getType())){
i = warehouseKeeperMapper.deleteByIds(typeId); i = warehouseKeeperMapper.deleteByIds(bean.getTypeIds());
}else{ }else{
if(StringHelper.isNotEmpty(typeId)){ if(StringHelper.isNotEmpty(bean.getTypeIds())){
List<WarehouseKeeper> list = new ArrayList<>(); List<WarehouseKeeper> list = new ArrayList<>();
String[] splitTypeIds = typeId.split("@"); String[] splitTypeIds = bean.getTypeIds().split("@");
i = warehouseKeeperMapper.deleteByIdsAll(splitTypeIds); i = warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
} }
} }

View File

@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="getWarehouseKeeperInfoAll" resultType="com.bonus.sgzb.base.domain.MaintenanceGang"> <select id="getMaintenanceGangInfoAll" resultType="com.bonus.sgzb.base.domain.MaintenanceGang">
SELECT mt.type_id as modelId ,mt.type_name as modelName, SELECT mt.type_id as modelId ,mt.type_name as modelName,
mt2.type_id, mt2.type_name , mt2.type_id, mt2.type_name ,
mt3.type_id as typeId,mt3.type_name as typeName, mt3.type_id as typeId,mt3.type_name as typeName,

View File

@ -35,6 +35,17 @@ public class AgreementInfoController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取协议管理列单个信息
*/
@ApiOperation(value = "获取协议管理列单个信息")
@GetMapping(value = "/getAgreementInfoId")
public AjaxResult getAgreementInfoId(AgreementInfo bean)
{
AgreementInfo agreementInfo = agreementInfoService.getAgreementInfoId(bean);
return success(agreementInfo);
}
/** /**
* 往来单位 * 往来单位
*/ */

View File

@ -8,7 +8,9 @@ import com.bonus.sgzb.material.domain.RepairTestInputDto;
import com.bonus.sgzb.material.domain.RepairTestInputVo; import com.bonus.sgzb.material.domain.RepairTestInputVo;
import com.bonus.sgzb.material.service.RepairTestInputService; import com.bonus.sgzb.material.service.RepairTestInputService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -28,7 +30,7 @@ public class RepairTestInputController extends BaseController {
@ApiOperation(value = "获取修试后入库列表") @ApiOperation(value = "获取修试后入库列表")
@PostMapping("getRepairedList") @PostMapping("getRepairedList")
public TableDataInfo getRepairedList(RepairTestInputDto dto){ public TableDataInfo getRepairedList(@Validated @RequestBody RepairTestInputDto dto){
startPage(); startPage();
List<RepairTestInputVo> list = service.getRepairedList(dto); List<RepairTestInputVo> list = service.getRepairedList(dto);
return getDataTable(list); return getDataTable(list);
@ -36,7 +38,7 @@ public class RepairTestInputController extends BaseController {
@ApiOperation(value = "获取修试后入库列表-详情") @ApiOperation(value = "获取修试后入库列表-详情")
@PostMapping("getRepairedDetailList") @PostMapping("getRepairedDetailList")
public TableDataInfo getRepairedDetailList(RepairTestInputDto dto){ public TableDataInfo getRepairedDetailList(@Validated @RequestBody RepairTestInputDto dto){
startPage(); startPage();
List<RepairTestInputDetailVo> list = service.getRepairedDetailList(dto); List<RepairTestInputDetailVo> list = service.getRepairedDetailList(dto);
return getDataTable(list); return getDataTable(list);
@ -44,7 +46,7 @@ public class RepairTestInputController extends BaseController {
@ApiOperation(value = "修试后入库-入库操作") @ApiOperation(value = "修试后入库-入库操作")
@PostMapping("inputByType") @PostMapping("inputByType")
public AjaxResult inputByType(String params){ public AjaxResult inputByType(@Validated @RequestBody String params){
return service.inputByType(params); return service.inputByType(params);
} }
} }

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.material.controller; package com.bonus.sgzb.material.controller;
import com.bonus.sgzb.common.core.web.controller.BaseController; 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.core.web.page.TableDataInfo;
import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo; import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo;
import com.bonus.sgzb.material.service.ReturnOfMaterialsInfoService; import com.bonus.sgzb.material.service.ReturnOfMaterialsInfoService;
@ -10,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.bonus.sgzb.material.domain.AgreementInfo;
import java.util.List; import java.util.List;
/** /**
@ -34,4 +35,16 @@ public class ReturnOfMaterialsInfoController extends BaseController {
List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getReturnOfMaterialsInfoAll(bean); List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getReturnOfMaterialsInfoAll(bean);
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取设备信息
*/
@ApiOperation(value = "获取设备信息")
@GetMapping("/getTypeList")
public AjaxResult getTypeList(String level){
List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getTypeList(level);
return AjaxResult.success(list);
}
} }

View File

@ -61,4 +61,7 @@ public class ReturnOfMaterialsInfo {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@ApiModelProperty(value = "关键字")
private String keyWord;
} }

View File

@ -25,4 +25,6 @@ public interface AgreementInfoMapper {
int update(AgreementInfo bean); int update(AgreementInfo bean);
int deleteByIds(String id); int deleteByIds(String id);
AgreementInfo getAgreementInfoId(AgreementInfo bean);
} }

View File

@ -14,4 +14,6 @@ import java.util.List;
public interface ReturnOfMaterialsInfoMapper { public interface ReturnOfMaterialsInfoMapper {
List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean); List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean);
List<ReturnOfMaterialsInfo> getTypeList(String level);
} }

View File

@ -20,4 +20,6 @@ public interface AgreementInfoService {
int update(AgreementInfo bean); int update(AgreementInfo bean);
int deleteByIds(String id); int deleteByIds(String id);
AgreementInfo getAgreementInfoId(AgreementInfo bean);
} }

View File

@ -11,4 +11,6 @@ import java.util.List;
public interface ReturnOfMaterialsInfoService { public interface ReturnOfMaterialsInfoService {
List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean); List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean);
List<ReturnOfMaterialsInfo> getTypeList(String level);
} }

View File

@ -52,6 +52,11 @@ public class AgreementInfoServiceImpl implements AgreementInfoService {
return agreementInfoMapper.deleteByIds(id); return agreementInfoMapper.deleteByIds(id);
} }
@Override
public AgreementInfo getAgreementInfoId(AgreementInfo bean) {
return agreementInfoMapper.getAgreementInfoId(bean);
}
private String purchaseCodeRule() { private String purchaseCodeRule() {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

View File

@ -21,4 +21,9 @@ public class ReturnOfMaterialsInfoServiceImpl implements ReturnOfMaterialsInfoSe
public List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean) { public List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean) {
return returnOfMaterialsInfoMapper.getReturnOfMaterialsInfoAll(bean); return returnOfMaterialsInfoMapper.getReturnOfMaterialsInfoAll(bean);
} }
@Override
public List<ReturnOfMaterialsInfo> getTypeList(String level) {
return returnOfMaterialsInfoMapper.getTypeList(level);
}
} }

View File

@ -123,16 +123,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getUnitList" resultType="com.bonus.sgzb.material.domain.AgreementInfo"> <select id="getUnitList" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
SELECT unit_id , unit_name FROM bm_unit_info SELECT unit_id , unit_name FROM bm_unit_info
WHERE del_flag = '0' WHERE del_flag = '0' and status = '0'
</select> </select>
<select id="getProjectList" resultType="com.bonus.sgzb.material.domain.AgreementInfo"> <select id="getProjectList" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
SELECT lot_id as projectId,lot_name as projectName FROM `bm_project_lot` SELECT lot_id as projectId,lot_name as projectName FROM `bm_project_lot`
WHERE del_flag = '0' WHERE del_flag = '0' and status = '0'
</select> </select>
<select id="selectNumByMonth" resultType="java.lang.Integer"> <select id="selectNumByMonth" resultType="java.lang.Integer">
select count(*) from bm_agreement_info where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') select count(*) from bm_agreement_info where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m')
</select> </select>
<select id="getAgreementInfoId" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
SELECT * FROM bm_agreement_info
WHERE agreement_id = #{agreementId}
</select>
</mapper> </mapper>

View File

@ -24,6 +24,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1' LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
LEFT JOIN ma_machine mm ON mm.ma_id = iad.ma_id LEFT JOIN ma_machine mm ON mm.ma_id = iad.ma_id
WHERE tt.task_status = '38' and mt.`level` = '4' and input_type ='2' WHERE tt.task_status = '38' and mt.`level` = '4' and input_type ='2'
<if test="keyWord != null and keyWord != ''">
and tt.`code` like concat('%', #{keyWord}, '%')
</if>
<if test="submitStorageTime != null and submitStorageTime != ''">
and DATE_FORMAT(iad.create_time, '%Y-%m-%d') = #{submitStorageTime}
</if>
<if test="typeId != null and typeId != ''">
and mt2.type_id = #{typeId}
</if>
<if test="modelId != null and modelId != ''">
and mt.type_id = #{modelId}
</if>
</select>
<select id="getTypeList" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
SELECT type_id as typeId,type_name as typeName FROM `ma_type`
WHERE `level` = #{level}
</select> </select>
</mapper> </mapper>