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

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

@ -28,6 +28,11 @@ public class LoginBody
*/
private Integer processFloor;
/**
*
*/
private String nickname;
public String getUsername()
{
return username;
@ -64,4 +69,12 @@ public class LoginBody
public void setProcessFloor(Integer 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 processId = JwtUtils.getProcessId(claims);
String processFloor = JwtUtils.getProcessFloor(claims);
String nickname = JwtUtils.getNickName(claims);
if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username))
{
return unauthorizedResponse(exchange, "令牌验证失败");
@ -82,6 +83,7 @@ public class AuthFilter implements GlobalFilter, Ordered
addHeader(mutate, SecurityConstants.DETAILS_USERNAME, username);
addHeader(mutate, SecurityConstants.DETAILS_PROCESS_ID, processId);
addHeader(mutate, SecurityConstants.DETAILS_PROCESS_FLOOR, processFloor);
addHeader(mutate, SecurityConstants.DETAILS_NICKNAME, nickname);
// 内部请求来源参数清除
removeHeader(mutate, SecurityConstants.FROM_SOURCE);
return chain.filter(exchange.mutate().request(mutate.build()).build());

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

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

@ -79,8 +79,17 @@ public class FifthWmsBoardServiceImpl implements FifthWmsBorderService {
List<WmsProductStock> productStocks = wmsProductStockMapper.selectProductStockPercentage();
Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation();//
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);
Integer oppylLocation = allLocation - emptyLocationCount;
Integer oppylLocation = containerInLocationList.size();//料箱在库内的数量
BigDecimal opplyLocationPercentage = new BigDecimal(oppylLocation).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP);
HashMap<String, Object> map = new HashMap<>();
map.put("wmsRawStocks",wmsRawStocks);

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

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

@ -45,7 +45,7 @@
</resultMap>
<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>
<select id="selectWmsBaseLocationList" parameterType="WmsBaseLocation" resultMap="WmsBaseLocationResult">

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

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

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

Loading…
Cancel
Save