看板前端和接口修改
master
xs 2 months ago
parent b0550b2e10
commit dee6de0402

@ -46,6 +46,7 @@ public class TokenController
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword()); LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
userInfo.setProcessId(form.getProcessId()); userInfo.setProcessId(form.getProcessId());
userInfo.setProcessFloor(form.getProcessFloor()); userInfo.setProcessFloor(form.getProcessFloor());
userInfo.setNickname(userInfo.getSysUser().getNickName());
// 获取登录token // 获取登录token
return R.ok(tokenService.createToken(userInfo)); return R.ok(tokenService.createToken(userInfo));
} }

@ -28,6 +28,11 @@ public class LoginBody
*/ */
private Integer processFloor; private Integer processFloor;
/**
*
*/
private String nickname;
public String getUsername() public String getUsername()
{ {
return username; return username;
@ -64,4 +69,12 @@ public class LoginBody
public void setProcessFloor(Integer processFloor) { public void setProcessFloor(Integer processFloor) {
this.processFloor = processFloor; this.processFloor = processFloor;
} }
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
} }

@ -71,6 +71,7 @@ public class AuthFilter implements GlobalFilter, Ordered
String username = JwtUtils.getUserName(claims); String username = JwtUtils.getUserName(claims);
String processId = JwtUtils.getProcessId(claims); String processId = JwtUtils.getProcessId(claims);
String processFloor = JwtUtils.getProcessFloor(claims); String processFloor = JwtUtils.getProcessFloor(claims);
String nickname = JwtUtils.getNickName(claims);
if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username)) if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username))
{ {
return unauthorizedResponse(exchange, "令牌验证失败"); return unauthorizedResponse(exchange, "令牌验证失败");
@ -82,6 +83,7 @@ public class AuthFilter implements GlobalFilter, Ordered
addHeader(mutate, SecurityConstants.DETAILS_USERNAME, username); addHeader(mutate, SecurityConstants.DETAILS_USERNAME, username);
addHeader(mutate, SecurityConstants.DETAILS_PROCESS_ID, processId); addHeader(mutate, SecurityConstants.DETAILS_PROCESS_ID, processId);
addHeader(mutate, SecurityConstants.DETAILS_PROCESS_FLOOR, processFloor); addHeader(mutate, SecurityConstants.DETAILS_PROCESS_FLOOR, processFloor);
addHeader(mutate, SecurityConstants.DETAILS_NICKNAME, nickname);
// 内部请求来源参数清除 // 内部请求来源参数清除
removeHeader(mutate, SecurityConstants.FROM_SOURCE); removeHeader(mutate, SecurityConstants.FROM_SOURCE);
return chain.filter(exchange.mutate().request(mutate.build()).build()); return chain.filter(exchange.mutate().request(mutate.build()).build());

@ -136,6 +136,12 @@ public class RyTask
remoteWmsService.synchronizeRawMaterialDeliveryInformationToERP(SecurityConstants.INNER); remoteWmsService.synchronizeRawMaterialDeliveryInformationToERP(SecurityConstants.INNER);
} }
public void synchronizeRawReturnInformationToERP(){
System.out.println("++定时同步原材料退库信息给ERP++syncRawMaterialDeliveryInformationToERP");
remoteWmsService.synchronizeRawReturnInformationToERP(SecurityConstants.INNER);
}
public void synchronizeProductInstockInformationToERP(Integer days){ public void synchronizeProductInstockInformationToERP(Integer days){
System.out.println("++定时同步成品入库信息给ERP++synchronizeProductInstockInformationToERP"); System.out.println("++定时同步成品入库信息给ERP++synchronizeProductInstockInformationToERP");
remoteWmsService.synchronizeProductInstockInformationToERP(days, SecurityConstants.INNER); remoteWmsService.synchronizeProductInstockInformationToERP(days, SecurityConstants.INNER);

@ -17,21 +17,22 @@ public class ThirdWmsBorderController {
private ThirdWmsBorderService thirdWmsBorderService; private ThirdWmsBorderService thirdWmsBorderService;
/** /**
* * ()
*/ */
@GetMapping("/monthRawAmount") @GetMapping("/monthRawAmount")
public AjaxResult monthRawAmount(){ public AjaxResult monthRawAmount(){
return AjaxResult.success(thirdWmsBorderService.monthRawAmount()); return AjaxResult.success(thirdWmsBorderService.monthRawAmount());
} }
/** /**
* *
*/ */
@GetMapping("/locationStatus") @GetMapping("/locationStatus")
public AjaxResult locationStatus(){ public AjaxResult locationStatus(){
return AjaxResult.success(thirdWmsBorderService.locationStatus()); return AjaxResult.success(thirdWmsBorderService.locationStatus());
} }
/** /**
* *
*/ */
@GetMapping("/productPlan") @GetMapping("/productPlan")
public AjaxResult productPlan(){ public AjaxResult productPlan(){

@ -79,8 +79,17 @@ public class FifthWmsBoardServiceImpl implements FifthWmsBorderService {
List<WmsProductStock> productStocks = wmsProductStockMapper.selectProductStockPercentage(); List<WmsProductStock> productStocks = wmsProductStockMapper.selectProductStockPercentage();
Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation();// Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation();//
Integer allLocation = wmsBaseLocationMapper.selectAllLocation(); Integer allLocation = wmsBaseLocationMapper.selectAllLocation();
WmsBaseLocation queryLocation = new WmsBaseLocation();
queryLocation.setWarehouseId(512L);
List<WmsBaseLocation> wmsBaseLocationList = wmsBaseLocationMapper.selectWmsBaseLocationList(queryLocation);
//过滤出料箱在库内的库位信息
List<WmsBaseLocation> containerInLocationList = wmsBaseLocationList.stream().filter(wbl -> wbl.getContainerStatus()!=null && wbl.getContainerStatus().equals("1")).collect(Collectors.toList());
BigDecimal emptyLocationPercentage = new BigDecimal(emptyLocationCount).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP); BigDecimal emptyLocationPercentage = new BigDecimal(emptyLocationCount).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP);
Integer oppylLocation = allLocation - emptyLocationCount;
Integer oppylLocation = containerInLocationList.size();//料箱在库内的数量
BigDecimal opplyLocationPercentage = new BigDecimal(oppylLocation).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP); BigDecimal opplyLocationPercentage = new BigDecimal(oppylLocation).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("wmsRawStocks",wmsRawStocks); map.put("wmsRawStocks",wmsRawStocks);

@ -25,10 +25,10 @@ public class ThirdWmsBorderServiceImpl implements ThirdWmsBorderService {
@Override @Override
public Map monthRawAmount() { public Map monthRawAmount() {
BigDecimal monthRawInAmount = wmsRawInstockMapper.monthRawInAmount(); BigDecimal monthRawInAmount = wmsRawInstockMapper.monthRawInAmount();//前一个月入库量
BigDecimal monthRawOutAmount = wmsRawOutstockMapper.monthRawOutAmount(); BigDecimal monthRawOutAmount = wmsRawOutstockMapper.monthRawOutAmount();//前一个月出库两
BigDecimal dayRawInAmount = wmsRawInstockMapper.dayRawInAmount(); BigDecimal dayRawInAmount = wmsRawInstockMapper.dayRawInAmount();//当日入库量
BigDecimal dayRawOutAmount = wmsRawOutstockMapper.dayRawOutAmount(); BigDecimal dayRawOutAmount = wmsRawOutstockMapper.dayRawOutAmount();//当日出库量
HashMap hashMap = new HashMap(); HashMap hashMap = new HashMap();
hashMap.put("monthRawInAmount",monthRawInAmount); hashMap.put("monthRawInAmount",monthRawInAmount);
hashMap.put("monthRawOutAmount",monthRawOutAmount); hashMap.put("monthRawOutAmount",monthRawOutAmount);

@ -145,6 +145,8 @@ public class WmsBaseLocation extends BaseEntity
@Excel(name = "允许混放产品 1是 0否;预留,允许混放不同的产品") @Excel(name = "允许混放产品 1是 0否;预留,允许混放不同的产品")
private String productMix; private String productMix;
private String containerStatus;//料箱状态(1:在库内2在库外)
public void setLocationId(Long locationId) public void setLocationId(Long locationId)
{ {
this.locationId = locationId; this.locationId = locationId;
@ -459,6 +461,14 @@ public class WmsBaseLocation extends BaseEntity
return productMix; return productMix;
} }
public String getContainerStatus() {
return containerStatus;
}
public void setContainerStatus(String containerStatus) {
this.containerStatus = containerStatus;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -99,7 +99,7 @@ public class WmsRawOutstockDetail extends BaseEntity {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date outstockTime; private Date outstockTime;

@ -45,7 +45,7 @@
</resultMap> </resultMap>
<sql id="selectWmsBaseLocationVo"> <sql id="selectWmsBaseLocationVo">
select location_id, warehouse_id, location_code,container_code,agv_position_code, warehouse_floor,loc_row, layer_num, loc_column, active_flag, manual_flag, qty_limit, instock_flag, outstock_flag, location_status,loc_deep, batch_mix, create_by, create_time, update_by, update_time, remark, del_flag, shelf_order, check_order, pick_order, pick_flag, is_open_kn_flag, location_scrap_type, volume_limit, weight_limit, length, width, height from wms_base_location select location_id, warehouse_id, location_code,container_code,container_status,agv_position_code, warehouse_floor,loc_row, layer_num, loc_column, active_flag, manual_flag, qty_limit, instock_flag, outstock_flag, location_status,loc_deep, batch_mix, create_by, create_time, update_by, update_time, remark, del_flag, shelf_order, check_order, pick_order, pick_flag, is_open_kn_flag, location_scrap_type, volume_limit, weight_limit, length, width, height from wms_base_location
</sql> </sql>
<select id="selectWmsBaseLocationList" parameterType="WmsBaseLocation" resultMap="WmsBaseLocationResult"> <select id="selectWmsBaseLocationList" parameterType="WmsBaseLocation" resultMap="WmsBaseLocationResult">

@ -399,15 +399,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where where
apply_date > now() - interval 1 month and warehouse_id = 311 apply_date > now() - interval 1 month and warehouse_id = 311
</select> </select>
<select id="productPlan" resultType="com.hw.wms.domain.WmsRawOutstock"> <select id="productPlan" resultType="com.hw.wms.domain.WmsRawOutstockDetail">
select select
a.*,b.material_name a.*,b.material_name,b.material_code,b.material_spec
from from
wms_raw_outstock a left join mes_base_material_info b on a.material_id = b.material_id wms_raw_outstock_detail a left join mes_base_material_info b on a.material_id = b.material_id
where where
a.warehouse_id = 311 a.warehouse_id = 311
order by order by
a.apply_date desc a.outstock_time desc
limit 100 limit 100
</select> </select>
<select id="locationCount" resultType="com.hw.wms.domain.WmsRawOutstock"> <select id="locationCount" resultType="com.hw.wms.domain.WmsRawOutstock">

@ -303,12 +303,12 @@ export default {
name: '占比', name: '占比',
data: [ data: [
{ {
'name': '已使用', 'name': '在库内',
y: parseFloat((e.data.opplyLocationPercentage * 100).toFixed(2)), y: parseFloat((e.data.opplyLocationPercentage * 100).toFixed(2)),
h: Math.min(parseFloat((e.data.opplyLocationPercentage * 100).toFixed(2)),50) h: Math.min(parseFloat((e.data.opplyLocationPercentage * 100).toFixed(2)),50)
}, },
{ {
name: '未使用', name: '在库外',
y: parseFloat(((1 - e.data.opplyLocationPercentage) * 100).toFixed(2)), y: parseFloat(((1 - e.data.opplyLocationPercentage) * 100).toFixed(2)),
h: Math.min(parseFloat(((1 - e.data.opplyLocationPercentage) * 100).toFixed(2)),50) h: Math.min(parseFloat(((1 - e.data.opplyLocationPercentage) * 100).toFixed(2)),50)
} }

@ -19,19 +19,16 @@
<div class="table1"> <div class="table1">
<div style="background-color: #094170aa"> <div style="background-color: #094170aa">
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 36%"> <div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 36%">
任务编号 物料编码
</div> </div>
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 13%"> <div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 26%">
任务类型
</div>
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 13%">
物料名称 物料名称
</div> </div>
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 13%"> <div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 13%">
库位编号 库位编号
</div> </div>
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 25%"> <div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 25%">
时间 出库时间
</div> </div>
</div> </div>
<vue-seamless-scroll <vue-seamless-scroll
@ -48,27 +45,22 @@
<div <div
class="scrollTableItem" style="width: 36%" class="scrollTableItem" style="width: 36%"
> >
{{ item.taskCode }} {{ item.materialCode }}
</div>
<div
class="scrollTableItem" style="width: 13%"
>
{{ item.taskType }}
</div> </div>
<div <div
class="scrollTableItem" style="width: 13%" class="scrollTableItem" style="width: 26%"
> >
{{ item.materialId }} {{ item.materialName }}
</div> </div>
<div <div
class="scrollTableItem" style="width: 13%" class="scrollTableItem" style="width: 13%"
> >
{{ item.rawOutstockId }} {{ item.locationCode }}
</div> </div>
<div <div
class="scrollTableItem" style="width: 25%" class="scrollTableItem" style="width: 25%"
> >
{{ item.applyDate }} {{ item.outstockTime }}
</div> </div>
</div> </div>
</div> </div>
@ -148,7 +140,7 @@ export default {
}, },
wareHouseData: [], wareHouseData: [],
title: [ title: [
'生产计划', '出库信息',
'当前库存统计' '当前库存统计'
], ],
titlePosition: [ titlePosition: [
@ -388,11 +380,11 @@ export default {
productPlan().then(e => { productPlan().then(e => {
this.scrollTableData = e.data.map(v => { this.scrollTableData = e.data.map(v => {
return { return {
taskCode: v.taskCode, materialCode: v.materialCode,
taskType: v.taskType, materialName: v.materialName,
materialId: v.materialName, materialSpec: v.materialSpec,
rawOutstockId: v.rawOutstockId, locationCode: v.locationCode,
applyDate: v.applyDate outstockTime: v.outstockTime
} }
}) })
}) })

Loading…
Cancel
Save