基础信息管理 设备组线调整

orign^2^2^2
A0010407 1 year ago
parent ed67be03ca
commit 0b0ad3d1ab

@ -11,9 +11,7 @@ import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.poi.ExcelMapUtil;
import com.op.common.security.utils.SecurityUtils;
import com.op.system.api.domain.SysUser;
import com.op.wms.domain.BaseTeamUser;
import com.op.wms.domain.EquSpareEquipment;
import com.op.wms.domain.WmsSparePartsLedger;
import com.op.wms.domain.*;
import com.op.wms.service.IBaseEquipmentService;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
@ -28,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.wms.domain.BaseEquipment;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
@ -241,4 +238,14 @@ public class BaseEquipmentController extends BaseController {
return getDataTable(list);
}
/**
* 线/
*/
@GetMapping("/getAuxiliaryEquipmentList")
public TableDataInfo getAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) {
startPage();
List<BaseEquipment> list = baseEquipmentService.selectAuxiliaryEquipmentList(equBindAuxiliaryEquipment);
return getDataTable(list);
}
}

@ -117,4 +117,7 @@ public interface BaseEquipmentMapper {
//删除
void deleteAuxiliaryEquipmentByCode(String equipmentCode);
//查询组线/辅助设备
List<BaseEquipment> selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment);
}

@ -3,10 +3,7 @@ package com.op.wms.service;
import java.util.List;
import com.op.common.core.web.domain.AjaxResult;
import com.op.wms.domain.BaseEquipment;
import com.op.wms.domain.BaseTeamUser;
import com.op.wms.domain.EquSpareEquipment;
import com.op.wms.domain.WmsSparePartsLedger;
import com.op.wms.domain.*;
/**
* Service
@ -83,4 +80,7 @@ public interface IBaseEquipmentService {
//查询人员列表
List<BaseTeamUser> getPersonList(BaseTeamUser baseTeamUser);
//查询组线/辅助设备
List<BaseEquipment> selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment);
}

@ -335,10 +335,14 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
EquBindAuxiliaryEquipment equBindAuxiliaryEquipment = new EquBindAuxiliaryEquipment();
equBindAuxiliaryEquipment.setAuxiliaryEquipmentCode(code);
equBindAuxiliaryEquipment.setEquipmentCode(baseEquipment.getEquipmentCode());
equBindAuxiliaryEquipment.setEquipmentName(baseEquipment.getEquipmentName());
equBindAuxiliaryEquipment.setCreateBy(SecurityUtils.getUsername());
equBindAuxiliaryEquipment.setCreateTime(DateUtils.getNowDate());
equBindAuxiliaryEquipment.setId(IdUtils.fastSimpleUUID());
equBindAuxiliaryEquipment.setAuxiliaryEquipmentName(baseEquipment.getEquipmentName());
//工厂号
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
equBindAuxiliaryEquipment.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
baseEquipmentMapper.bindAuxiliaryEquipment(equBindAuxiliaryEquipment);
}
}
@ -552,4 +556,16 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
return baseTeamUserMapper.getPersonList(baseTeamUser);
}
/**
*
*
* @param equBindAuxiliaryEquipment
* @return
*/
@Override
@DS("#header.poolName")
public List<BaseEquipment> selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) {
return baseEquipmentMapper.selectAuxiliaryEquipmentList(equBindAuxiliaryEquipment);
}
}

@ -581,4 +581,15 @@
where equipment_id = #{equipmentId}
</update>
<select id="selectAuxiliaryEquipmentList" parameterType="com.op.wms.domain.EquBindAuxiliaryEquipment" resultType="BaseEquipment">
select
ebac.auxiliary_equipment_code AS equipmentCode,
be.equipment_name AS equipmentName,
be.equipment_status AS equipmentStatus
from equ_bind_auxiliary_equipment ebac
left join base_equipment be on ebac.auxiliary_equipment_code = be.equipment_code
where ebac.equipment_code = #{equipmentCode}
</select>
</mapper>
Loading…
Cancel
Save