工机具管理-库管员配置;维修班配置
This commit is contained in:
parent
8fa742fb8c
commit
9d5ca4a462
|
|
@ -29,11 +29,11 @@ public class MaintenanceGangController extends BaseController {
|
|||
* 获取维修班配置列表
|
||||
*/
|
||||
@ApiOperation(value = "获取维修班配置列表")
|
||||
@GetMapping("/warehouseKeeperInfoAll")
|
||||
public TableDataInfo getWarehouseKeeperInfoAll(MaintenanceGang bean)
|
||||
@GetMapping("/maintenanceGangInfoAll")
|
||||
public TableDataInfo getMaintenanceGangInfoAll(MaintenanceGang bean)
|
||||
{
|
||||
startPage();
|
||||
List<MaintenanceGang> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean);
|
||||
List<MaintenanceGang> list = warehouseKeeperService.getMaintenanceGangInfoAll(bean);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
@ -61,8 +61,8 @@ public class MaintenanceGangController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "维修班配置-删除")
|
||||
@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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ public class WarehouseKeeperController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "库管员配置-删除")
|
||||
@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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,4 +43,7 @@ public class MaintenanceGang extends BaseEntity {
|
|||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
@ApiModelProperty(value = "删除类型1单个 2多个")
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,4 +43,8 @@ public class WarehouseKeeper extends BaseEntity {
|
|||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "删除类型1单个 2多个")
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
*/
|
||||
@Mapper
|
||||
public interface MaintenanceGangMapper {
|
||||
List<MaintenanceGang> getWarehouseKeeperInfoAll(MaintenanceGang bean);
|
||||
List<MaintenanceGang> getMaintenanceGangInfoAll(MaintenanceGang bean);
|
||||
|
||||
List<MaintenanceGang> getMaUserList(String userName);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import java.util.List;
|
|||
* @author lsun
|
||||
*/
|
||||
public interface MaintenanceGangService {
|
||||
List<MaintenanceGang> getWarehouseKeeperInfoAll(MaintenanceGang bean);
|
||||
List<MaintenanceGang> getMaintenanceGangInfoAll(MaintenanceGang bean);
|
||||
|
||||
List<MaintenanceGang> getMaUserList (String userName);
|
||||
|
||||
int add(MaintenanceGang bean);
|
||||
|
||||
int deleteByIds(String typeId,String type);
|
||||
int deleteByIds(MaintenanceGang bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ public interface WarehouseKeeperService {
|
|||
|
||||
int add(WarehouseKeeper bean);
|
||||
|
||||
int deleteByIds(String typeId,String type);
|
||||
int deleteByIds(WarehouseKeeper bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ public class MaintenanceGangServiceImpl implements MaintenanceGangService {
|
|||
private MaintenanceGangMapper MaintenanceGangMapper;
|
||||
|
||||
@Override
|
||||
public List<MaintenanceGang> getWarehouseKeeperInfoAll(MaintenanceGang bean) {
|
||||
return MaintenanceGangMapper.getWarehouseKeeperInfoAll(bean);
|
||||
public List<MaintenanceGang> getMaintenanceGangInfoAll(MaintenanceGang bean) {
|
||||
return MaintenanceGangMapper.getMaintenanceGangInfoAll(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -55,15 +55,15 @@ public class MaintenanceGangServiceImpl implements MaintenanceGangService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(String typeId,String type) {
|
||||
public int deleteByIds(MaintenanceGang bean) {
|
||||
int i = 0;
|
||||
if(StringHelper.isNotEmpty(type)){
|
||||
if("1".equals(type)){
|
||||
i = MaintenanceGangMapper.deleteByIds(typeId);
|
||||
if(StringHelper.isNotEmpty(bean.getType())){
|
||||
if("1".equals(bean.getType())){
|
||||
i = MaintenanceGangMapper.deleteByIds(bean.getTypeIds());
|
||||
}else{
|
||||
if(StringHelper.isNotEmpty(typeId)){
|
||||
if(StringHelper.isNotEmpty(bean.getTypeIds())){
|
||||
List<MaintenanceGang> list = new ArrayList<>();
|
||||
String[] splitTypeIds = typeId.split("@");
|
||||
String[] splitTypeIds = bean.getTypeIds().split("@");
|
||||
i = MaintenanceGangMapper.deleteByIdsAll(splitTypeIds);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,15 +57,15 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(String typeId,String type) {
|
||||
public int deleteByIds(WarehouseKeeper bean) {
|
||||
int i = 0;
|
||||
if(StringHelper.isNotEmpty(type)){
|
||||
if("1".equals(type)){
|
||||
i = warehouseKeeperMapper.deleteByIds(typeId);
|
||||
if(StringHelper.isNotEmpty(bean.getType())){
|
||||
if("1".equals(bean.getType())){
|
||||
i = warehouseKeeperMapper.deleteByIds(bean.getTypeIds());
|
||||
}else{
|
||||
if(StringHelper.isNotEmpty(typeId)){
|
||||
if(StringHelper.isNotEmpty(bean.getTypeIds())){
|
||||
List<WarehouseKeeper> list = new ArrayList<>();
|
||||
String[] splitTypeIds = typeId.split("@");
|
||||
String[] splitTypeIds = bean.getTypeIds().split("@");
|
||||
i = warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</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,
|
||||
mt2.type_id, mt2.type_name ,
|
||||
mt3.type_id as typeId,mt3.type_name as typeName,
|
||||
|
|
|
|||
|
|
@ -35,6 +35,17 @@ public class AgreementInfoController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取协议管理列单个信息
|
||||
*/
|
||||
@ApiOperation(value = "获取协议管理列单个信息")
|
||||
@GetMapping(value = "/getAgreementInfoId")
|
||||
public AjaxResult getAgreementInfoId(AgreementInfo bean)
|
||||
{
|
||||
AgreementInfo agreementInfo = agreementInfoService.getAgreementInfoId(bean);
|
||||
return success(agreementInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 往来单位
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ import com.bonus.sgzb.material.domain.RepairTestInputDto;
|
|||
import com.bonus.sgzb.material.domain.RepairTestInputVo;
|
||||
import com.bonus.sgzb.material.service.RepairTestInputService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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.RestController;
|
||||
|
||||
|
|
@ -28,7 +30,7 @@ public class RepairTestInputController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "获取修试后入库列表")
|
||||
@PostMapping("getRepairedList")
|
||||
public TableDataInfo getRepairedList(RepairTestInputDto dto){
|
||||
public TableDataInfo getRepairedList(@Validated @RequestBody RepairTestInputDto dto){
|
||||
startPage();
|
||||
List<RepairTestInputVo> list = service.getRepairedList(dto);
|
||||
return getDataTable(list);
|
||||
|
|
@ -36,7 +38,7 @@ public class RepairTestInputController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "获取修试后入库列表-详情")
|
||||
@PostMapping("getRepairedDetailList")
|
||||
public TableDataInfo getRepairedDetailList(RepairTestInputDto dto){
|
||||
public TableDataInfo getRepairedDetailList(@Validated @RequestBody RepairTestInputDto dto){
|
||||
startPage();
|
||||
List<RepairTestInputDetailVo> list = service.getRepairedDetailList(dto);
|
||||
return getDataTable(list);
|
||||
|
|
@ -44,7 +46,7 @@ public class RepairTestInputController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "修试后入库-入库操作")
|
||||
@PostMapping("inputByType")
|
||||
public AjaxResult inputByType(String params){
|
||||
public AjaxResult inputByType(@Validated @RequestBody String params){
|
||||
return service.inputByType(params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.material.controller;
|
||||
|
||||
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.material.domain.ReturnOfMaterialsInfo;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bonus.sgzb.material.domain.AgreementInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -34,4 +35,16 @@ public class ReturnOfMaterialsInfoController extends BaseController {
|
|||
List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getReturnOfMaterialsInfoAll(bean);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取设备信息
|
||||
*/
|
||||
@ApiOperation(value = "获取设备信息")
|
||||
@GetMapping("/getTypeList")
|
||||
public AjaxResult getTypeList(String level){
|
||||
List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getTypeList(level);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,7 @@ public class ReturnOfMaterialsInfo {
|
|||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,4 +25,6 @@ public interface AgreementInfoMapper {
|
|||
int update(AgreementInfo bean);
|
||||
|
||||
int deleteByIds(String id);
|
||||
|
||||
AgreementInfo getAgreementInfoId(AgreementInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@ import java.util.List;
|
|||
public interface ReturnOfMaterialsInfoMapper {
|
||||
|
||||
List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean);
|
||||
|
||||
List<ReturnOfMaterialsInfo> getTypeList(String level);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,4 +20,6 @@ public interface AgreementInfoService {
|
|||
int update(AgreementInfo bean);
|
||||
|
||||
int deleteByIds(String id);
|
||||
|
||||
AgreementInfo getAgreementInfoId(AgreementInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,6 @@ import java.util.List;
|
|||
public interface ReturnOfMaterialsInfoService {
|
||||
|
||||
List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean);
|
||||
|
||||
List<ReturnOfMaterialsInfo> getTypeList(String level);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,11 @@ public class AgreementInfoServiceImpl implements AgreementInfoService {
|
|||
return agreementInfoMapper.deleteByIds(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementInfo getAgreementInfoId(AgreementInfo bean) {
|
||||
return agreementInfoMapper.getAgreementInfoId(bean);
|
||||
}
|
||||
|
||||
|
||||
private String purchaseCodeRule() {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
|
|||
|
|
@ -21,4 +21,9 @@ public class ReturnOfMaterialsInfoServiceImpl implements ReturnOfMaterialsInfoSe
|
|||
public List<ReturnOfMaterialsInfo> getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean) {
|
||||
return returnOfMaterialsInfoMapper.getReturnOfMaterialsInfoAll(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReturnOfMaterialsInfo> getTypeList(String level) {
|
||||
return returnOfMaterialsInfoMapper.getTypeList(level);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,16 +123,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getUnitList" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
||||
SELECT unit_id , unit_name FROM bm_unit_info
|
||||
WHERE del_flag = '0'
|
||||
WHERE del_flag = '0' and status = '0'
|
||||
</select>
|
||||
|
||||
<select id="getProjectList" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
||||
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 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>
|
||||
|
||||
<select id="getAgreementInfoId" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
||||
SELECT * FROM bm_agreement_info
|
||||
WHERE agreement_id = #{agreementId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -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_machine mm ON mm.ma_id = iad.ma_id
|
||||
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>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue