更新
This commit is contained in:
@@ -75,6 +75,15 @@ public class ProduceshiftorderController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("下发工单")
|
||||
@ApiOperation("下发工单")
|
||||
//@PreAuthorize("@el.check('produceshiftorder:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> send(@RequestBody String id) {
|
||||
produceshiftorderService.send(id);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("导出工单")
|
||||
@ApiOperation("导出工单")
|
||||
@GetMapping(value = "/download")
|
||||
|
||||
@@ -94,6 +94,13 @@ public interface ProduceshiftorderService {
|
||||
*/
|
||||
void deleteAll(String[] ids);
|
||||
|
||||
/**
|
||||
* 下发
|
||||
*
|
||||
* @param id /
|
||||
*/
|
||||
void send(String id);
|
||||
|
||||
/**
|
||||
* 取消任务
|
||||
*
|
||||
|
||||
@@ -12,13 +12,13 @@ import java.io.Serializable;
|
||||
public class ProduceshiftorderdetailDto implements Serializable {
|
||||
|
||||
/** 工单明细标识 */
|
||||
private String orderDetail_id;
|
||||
private String order_detail_id;
|
||||
|
||||
/** 工单明细编码 */
|
||||
private String orderDetail_code;
|
||||
private String order_detail_code;
|
||||
|
||||
/** 工单明细类型 */
|
||||
private String orderDetail_type;
|
||||
private String order_detail_type;
|
||||
|
||||
/** 优先级 */
|
||||
private String priority;
|
||||
|
||||
@@ -80,8 +80,9 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
for (int j = 0; j < orderDteail_ja.size(); j++) {
|
||||
JSONObject orderDteail_jo = orderDteail_ja.getJSONObject(j);
|
||||
JSONObject new_jo = new JSONObject();
|
||||
new_jo.put("order_id", orderDteail_jo.getString("orderdetail_id"));
|
||||
new_jo.put("order_code", orderDteail_jo.getString("orderdetail_code"));
|
||||
new_jo.put("order_id", orderDteail_jo.getString("order_detail_id"));
|
||||
new_jo.put("order_code", orderDteail_jo.getString("order_detail_code"));
|
||||
new_jo.put("order_status", orderDteail_jo.getString("order_detail_status"));
|
||||
new_jo.put("is_active", orderDteail_jo.getString("is_active"));
|
||||
new_jo.put("is_delete", orderDteail_jo.getString("is_delete"));
|
||||
new_jo.put("create_by", orderDteail_jo.getString("create_by"));
|
||||
@@ -91,7 +92,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
new_jo.put("cust_id", orderDteail_jo.getString("cust_id"));
|
||||
new_jo.put("cust_code", orderDteail_jo.getString("cust_code"));
|
||||
new_jo.put("cust_name", orderDteail_jo.getString("cust_name"));
|
||||
new_jo.put("order_qty", orderDteail_jo.getString("order_qty"));
|
||||
new_jo.put("qty", orderDteail_jo.getString("order_detail_qty"));
|
||||
new_jo.put("type", "orderDteail");
|
||||
jo.put("is_flag", "0");
|
||||
children.add(new_jo);
|
||||
@@ -171,6 +172,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
orderDto.setMaterial_code(material_code);
|
||||
orderDto.setMaterial_name(material_name);
|
||||
orderDto.setMaterial_spec(material_spec);
|
||||
orderDto.setMaterial_uuid(material_id);
|
||||
orderDto.setLength(length);
|
||||
orderDto.setOuter_diameter(outer_diameter);
|
||||
orderDto.setWall_thickness(wall_thickness);
|
||||
@@ -208,9 +210,10 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
detaildto.setOrder_id(order_id);
|
||||
detaildto.setOrder_code(order_code);
|
||||
detaildto.setOrder_detail_status("00");
|
||||
detaildto.setOrder_qty(qty);
|
||||
detaildto.setIs_deleted("0");
|
||||
detaildto.setOrderDetail_id(IdUtil.simpleUUID());
|
||||
detaildto.setOrderDetail_code(String.valueOf(i));
|
||||
detaildto.setOrder_detail_id(IdUtil.simpleUUID());
|
||||
detaildto.setOrder_detail_code(String.valueOf(i+1));
|
||||
detaildto.setCust_id(customer_id);
|
||||
detaildto.setCust_code(customer_code);
|
||||
detaildto.setCust_name(customer_name);
|
||||
@@ -220,7 +223,6 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
detaildto.setLength(length);
|
||||
detaildto.setWall_thickness(wall_thickness);
|
||||
detaildto.setOuter_diameter(outer_diameter);
|
||||
detaildto.setOrderDetail_code(detail_qty);
|
||||
detaildto.setLabeling_message(lettering_message);
|
||||
detaildto.setStrap_number(strap_number);
|
||||
detaildto.setStrap_tailint_number(strap_tailint_number);
|
||||
@@ -271,6 +273,24 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void send(String id) {
|
||||
ProduceshiftorderDto entity = this.findById(id);
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
entity.setIs_deleted("1");
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
||||
JSONObject json= (JSONObject) JSONObject.toJSON(entity);
|
||||
wo.update(json);
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("is_deleted","1");
|
||||
WQLObject.getWQLObject("acs_produceshiftorderdetail").update(map,"order_id = '"+ id + "'");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void download(List<ProduceshiftorderDto> dtos, HttpServletResponse response) throws IOException {
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user