代码修改
This commit is contained in:
@@ -23,6 +23,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.common.config.RsaProperties;
|
import org.nl.modules.common.config.RsaProperties;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.PageUtil;
|
import org.nl.modules.common.utils.PageUtil;
|
||||||
@@ -39,6 +40,7 @@ import org.nl.modules.system.service.UserService;
|
|||||||
import org.nl.modules.system.service.dto.RoleSmallDto;
|
import org.nl.modules.system.service.dto.RoleSmallDto;
|
||||||
import org.nl.modules.system.service.dto.UserDto;
|
import org.nl.modules.system.service.dto.UserDto;
|
||||||
import org.nl.modules.system.service.dto.UserQueryCriteria;
|
import org.nl.modules.system.service.dto.UserQueryCriteria;
|
||||||
|
import org.slf4j.MDC;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
@@ -62,6 +64,7 @@ import java.util.stream.Collectors;
|
|||||||
* @date 2018-11-23
|
* @date 2018-11-23
|
||||||
*/
|
*/
|
||||||
@Api(tags = "系统:用户管理")
|
@Api(tags = "系统:用户管理")
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/users")
|
@RequestMapping("/api/users")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -84,6 +87,12 @@ public class UserController {
|
|||||||
@GetMapping
|
@GetMapping
|
||||||
@SaCheckPermission("user:list")
|
@SaCheckPermission("user:list")
|
||||||
public ResponseEntity<Object> query(UserQueryCriteria criteria, Pageable pageable){
|
public ResponseEntity<Object> query(UserQueryCriteria criteria, Pageable pageable){
|
||||||
|
try {
|
||||||
|
MDC.put("log_file_type", "init");
|
||||||
|
log.debug("测试.................");
|
||||||
|
} finally {
|
||||||
|
MDC.remove("log_file_type");
|
||||||
|
}
|
||||||
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
|
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
|
||||||
criteria.getDeptIds().add(criteria.getDeptId());
|
criteria.getDeptIds().add(criteria.getDeptId());
|
||||||
criteria.getDeptIds().addAll(deptService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
|
criteria.getDeptIds().addAll(deptService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
|
||||||
|
|||||||
@@ -102,4 +102,6 @@ public class MaterialbaseDto implements Serializable {
|
|||||||
private Long product_series;
|
private Long product_series;
|
||||||
|
|
||||||
private Integer standing_time;
|
private Integer standing_time;
|
||||||
|
|
||||||
|
private Integer material_qty;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
//载具数量
|
//载具数量
|
||||||
String vehicle_num = whereJson.getString("vehicle_num");
|
String vehicle_num = whereJson.getString("vehicle_num");
|
||||||
//物料数量
|
//物料数量
|
||||||
String material_num = whereJson.getString("material_num");
|
String material_num = whereJson.getString("qty");
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(type)) throw new BadRequestException("类型不能为空");
|
if (ObjectUtil.isEmpty(type)) throw new BadRequestException("类型不能为空");
|
||||||
if (ObjectUtil.isEmpty(point_code)) throw new BadRequestException("点位不能为空");
|
if (ObjectUtil.isEmpty(point_code)) throw new BadRequestException("点位不能为空");
|
||||||
|
|||||||
@@ -74,6 +74,15 @@ public class WorkorderController {
|
|||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/executes")
|
||||||
|
@Log("手持确认工单执行")
|
||||||
|
@ApiOperation("手持确认工单执行")
|
||||||
|
//@SaCheckPermission("produceshiftorder:edit")
|
||||||
|
public ResponseEntity<Object> executes(@RequestBody JSONObject param){
|
||||||
|
workordeService.executes(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/getDevice")
|
@PostMapping("/getDevice")
|
||||||
@Log("根据登录用户设备下拉")
|
@Log("根据登录用户设备下拉")
|
||||||
@ApiOperation("根据登录用户设备下拉")
|
@ApiOperation("根据登录用户设备下拉")
|
||||||
|
|||||||
@@ -121,4 +121,10 @@ public interface WorkordeService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONArray getDtl(JSONObject param);
|
JSONArray getDtl(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单执行
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
|
void executes(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ public class WorkorderServiceImpl implements WorkordeService {
|
|||||||
JSONObject json = wo.query("workorder_id = '" + param.getString("workorder_id") + "'").uniqueResult(0);
|
JSONObject json = wo.query("workorder_id = '" + param.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(json.getString("device_id"))) throw new BadRequestException("请先绑定设备");
|
if (ObjectUtil.isEmpty(json.getString("device_id"))) throw new BadRequestException("请先绑定设备");
|
||||||
|
|
||||||
JSONArray orderArr = wo.query("device_id = '" + param.getString("device_id") + "' and order_status = '02'").getResultJSONArray(0);
|
JSONArray orderArr = wo.query("device_id = '" + param.getString("device_id") + "' and order_status = '3'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(orderArr)) throw new BadRequestException("当前设备正在生产中");
|
if (ObjectUtil.isNotEmpty(orderArr)) throw new BadRequestException("当前设备正在生产中");
|
||||||
|
|
||||||
json.put("order_status", "2");
|
json.put("order_status", "2");
|
||||||
@@ -439,4 +439,24 @@ public class WorkorderServiceImpl implements WorkordeService {
|
|||||||
return resultJSONArray;
|
return resultJSONArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void executes(JSONObject param) {
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||||
|
JSONObject json = wo.query("workorder_id = '" + param.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(json.getString("device_id"))) throw new BadRequestException("请先绑定设备");
|
||||||
|
|
||||||
|
JSONArray orderArr = wo.query("device_id = '" + json.getString("device_id") + "' and order_status = '3'").getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(orderArr)) throw new BadRequestException("当前设备正在生产中");
|
||||||
|
|
||||||
|
json.put("order_status", "3");
|
||||||
|
json.put("update_optid", currentUserId);
|
||||||
|
json.put("update_optname", nickName);
|
||||||
|
json.put("update_time", now);
|
||||||
|
wo.update(json);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ public class YqxSendMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void findNextPoint() {
|
public void findNextPoint() {
|
||||||
String task_status = TaskStatusEnum.SURE_START.getCode();
|
String task_status = TaskStatusEnum.SURE_START.getCode();
|
||||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||||
@@ -141,8 +142,6 @@ public class YqxSendMaterialTask extends AbstractAcsTask {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String createTask(JSONObject whereJson) {
|
public String createTask(JSONObject whereJson) {
|
||||||
String point_code1 = whereJson.getString("point_code1");
|
String point_code1 = whereJson.getString("point_code1");
|
||||||
String vehicle_type = whereJson.getString("vehicle_type");
|
|
||||||
String vehicle_code = whereJson.getString("vehicle_code");
|
|
||||||
String qty = whereJson.getString("qty");
|
String qty = whereJson.getString("qty");
|
||||||
|
|
||||||
//生产工单表【PDM_BD_WorkOrder】
|
//生产工单表【PDM_BD_WorkOrder】
|
||||||
@@ -169,10 +168,9 @@ public class YqxSendMaterialTask extends AbstractAcsTask {
|
|||||||
.task_name("油漆线满料")
|
.task_name("油漆线满料")
|
||||||
.task_status(TaskStatusEnum.SURE_START.getCode())
|
.task_status(TaskStatusEnum.SURE_START.getCode())
|
||||||
.point_code1(point_code1)
|
.point_code1(point_code1)
|
||||||
.vehicle_code(vehicle_code)
|
|
||||||
.material_info_id(workOrderObj.getLong("workorder_id"))
|
.material_info_id(workOrderObj.getLong("workorder_id"))
|
||||||
.material_id(workOrderObj.getLong("material_id"))
|
.material_id(workOrderObj.getLong("material_id"))
|
||||||
.vehicle_type(vehicle_type)
|
.vehicle_type(workOrderObj.getString("vehicle_type"))
|
||||||
.handle_class(THIS_CLASS)
|
.handle_class(THIS_CLASS)
|
||||||
.material_qty(qty)
|
.material_qty(qty)
|
||||||
.create_time(DateUtil.now())
|
.create_time(DateUtil.now())
|
||||||
|
|||||||
Binary file not shown.
@@ -32,6 +32,14 @@ export function submits(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function executes(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/workorder/executes',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function getDevice(data) {
|
export function getDevice(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/workorder/getDevice',
|
url: 'api/workorder/getDevice',
|
||||||
@@ -96,4 +104,4 @@ export function getDtl(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
export default { add, edit, del, submits, executes, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料编码" prop="material_code">
|
<el-form-item label="物料柜号" prop="material_code">
|
||||||
<el-input v-model="form.material_code" style="width: 200px;" />
|
<el-input v-model="form.material_code" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -125,6 +125,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料数量" prop="standing_time">
|
||||||
|
<el-input-number v-model="form.material_qty" :controls="false" :min="0" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
@@ -140,9 +147,10 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
<el-table-column prop="material_code" label="物料柜号" width="160" />
|
||||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
||||||
|
<el-table-column prop="material_qty" label="物料数量" width="100" />
|
||||||
<el-table-column prop="material_model" label="物料型号" />
|
<el-table-column prop="material_model" label="物料型号" />
|
||||||
<el-table-column prop="class_name" label="物料分类" width="140" />
|
<el-table-column prop="class_name" label="物料分类" width="140" />
|
||||||
<el-table-column prop="unit_name" label="计量单位" />
|
<el-table-column prop="unit_name" label="计量单位" />
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划数量" prop="plan_qty">
|
<el-form-item label="计划数量" prop="plan_qty">
|
||||||
<el-input v-model="form.plan_qty" style="width: 200px;" />
|
<el-input v-model="form.plan_qty" style="width: 200px;" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具类型" prop="vehicle_type">
|
<el-form-item label="载具类型" prop="vehicle_type">
|
||||||
<el-select v-model="form.vehicle_type" style="width: 200px" filterable placeholder="请选择">
|
<el-select v-model="form.vehicle_type" style="width: 200px" filterable placeholder="请选择">
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudWorkorder from '@/api/wms/pdm/workorder'
|
import crudWorkorder, { executes } from '@/api/wms/pdm/workorder'
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -454,6 +454,7 @@ export default {
|
|||||||
this.form.material_code = row.material_code
|
this.form.material_code = row.material_code
|
||||||
this.form.material_name = row.material_name
|
this.form.material_name = row.material_name
|
||||||
this.form.material_spec = row.material_spec
|
this.form.material_spec = row.material_spec
|
||||||
|
this.form.plan_qty = row.material_qty
|
||||||
},
|
},
|
||||||
tableChanged(row) {
|
tableChanged(row) {
|
||||||
this.form.device_id = row.device_id
|
this.form.device_id = row.device_id
|
||||||
@@ -461,8 +462,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 下发
|
// 下发
|
||||||
submits(row) {
|
submits(row) {
|
||||||
crudWorkorder.submits({ workorder_id: row.workorder_id }).then(res => {
|
crudWorkorder.executes({ workorder_id: row.workorder_id }).then(res => {
|
||||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('执行成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,8 +58,9 @@
|
|||||||
|
|
||||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_name" label="物料名称" min-width="200" show-overflow-tooltip />
|
<el-table-column prop="material_name" label="物料名称" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_spec" label="规格" show-overflow-tooltip />
|
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_model" label="型号" show-overflow-tooltip />
|
<el-table-column prop="material_model" label="物料型号" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="material_qty" label="物料数量" width="100" />
|
||||||
<el-table-column prop="class_code" label="分类编码" show-overflow-tooltip />
|
<el-table-column prop="class_code" label="分类编码" show-overflow-tooltip />
|
||||||
<el-table-column prop="class_name" label="物料分类" show-overflow-tooltip />
|
<el-table-column prop="class_name" label="物料分类" show-overflow-tooltip />
|
||||||
<el-table-column prop="unit_name" label="计量单位" />
|
<el-table-column prop="unit_name" label="计量单位" />
|
||||||
|
|||||||
Reference in New Issue
Block a user