新增方法
This commit is contained in:
@@ -113,6 +113,31 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询该气涨轴是否存在已经套轴的分切计划
|
||||||
|
JSONArray case_rows = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzzno = '"+qzzno+"' AND is_delete = '0' AND is_child_tz_ok = '1' AND status < '09'").getResultJSONArray(0);
|
||||||
|
for (int i = 0; i < case_rows.size(); i++) {
|
||||||
|
JSONObject row = case_rows.getJSONObject(i);
|
||||||
|
if (!split_group.equals(row.getString("split_group"))) {
|
||||||
|
throw new BadRequestException("该气涨轴上绑定的分切计划与当前所选分切计划分切组不同!");
|
||||||
|
}
|
||||||
|
if (!resource_name.equals(row.getString("resource_name"))) {
|
||||||
|
throw new BadRequestException("该气涨轴上绑定的分切计划与当前所选分切计划机台编号不同!");
|
||||||
|
}
|
||||||
|
if (order_type.equals("1")) {
|
||||||
|
if (!parent_container_name.equals(row.getString("parent_container_name"))) {
|
||||||
|
throw new BadRequestException("该气涨轴上绑定的分切计划与当前所选分切计划母卷号不同!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))) {
|
||||||
|
throw new BadRequestException("该气涨轴上绑定的分切计划与当前所选分切计划来源子卷号不同!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (case_rows.size()>=2){
|
||||||
|
throw new BadRequestException("该气涨轴上已经绑定了两个分切计划,无法继续绑定!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject row = rows.getJSONObject(i);
|
JSONObject row = rows.getJSONObject(i);
|
||||||
String workorder_id = row.getString("workorder_id");
|
String workorder_id = row.getString("workorder_id");
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
||||||
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '" + empty_point.getString("point_location") + "' AND product_area = '" + empty_point.getString("product_area") + "' AND sort_seq = '" + empty_point.getString("sort_seq") + "' order by point_code desc").uniqueResult(0);
|
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '" + empty_point.getString("point_location") + "' AND product_area = '" + empty_point.getString("product_area") + "' AND sort_seq = '" + empty_point.getString("sort_seq") + "' order by point_code desc").uniqueResult(0);
|
||||||
//判断是否存在任务
|
//判断是否存在任务
|
||||||
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '" + right_point.getString("point_code") + "' OR point_code2 = '" + right_point.getString("point_code") + "') AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '" + right_point.getString("point_code") + "' OR point_code2 = '" + right_point.getString("point_code") + "') AND task_status < '07' AND is_delete = '0' AND task_type = '010402'").uniqueResult(0);
|
||||||
if (!right_point.getString("point_status").equals("01")) {
|
if (!right_point.getString("point_status").equals("01")) {
|
||||||
throw new BadRequestException(empty_point.getString("point_code") + "所在一截输送线缓存位存在货物,请使用【载具横移】功能将货物横移!");
|
throw new BadRequestException(empty_point.getString("point_code") + "所在一截输送线缓存位存在货物,请使用【载具横移】功能将货物横移!");
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
||||||
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '" + point_jo.getString("point_location") + "' AND product_area = '" + point_jo.getString("product_area") + "' AND sort_seq = '" + point_jo.getString("sort_seq") + "' order by point_code desc").uniqueResult(0);
|
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '" + point_jo.getString("point_location") + "' AND product_area = '" + point_jo.getString("product_area") + "' AND sort_seq = '" + point_jo.getString("sort_seq") + "' order by point_code desc").uniqueResult(0);
|
||||||
//判断是否存在任务
|
//判断是否存在任务
|
||||||
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '" + right_point.getString("point_code") + "' OR point_code2 = '" + right_point.getString("point_code") + "') AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 = '" + right_point.getString("point_code") + "' OR point_code2 = '" + right_point.getString("point_code") + "') AND task_status < '07' AND is_delete = '0' AND task_type = '010402'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(task_jo)) {
|
if (ObjectUtil.isNotEmpty(task_jo)) {
|
||||||
throw new BadRequestException(point_jo.getString("point_code") + "所在一截输送线存在未完成的任务,请稍等几分钟后进行下发!");
|
throw new BadRequestException(point_jo.getString("point_code") + "所在一截输送线存在未完成的任务,请稍等几分钟后进行下发!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,14 @@ public class SlittingproductionplanController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log("入站完成")
|
||||||
|
@ApiOperation("入站完成")
|
||||||
|
@PostMapping("/inFinish")
|
||||||
|
public ResponseEntity<Object> inFinish(@RequestBody JSONObject whereJson) {
|
||||||
|
slittingproductionplanService.inFinish(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@Log("强制完成")
|
@Log("强制完成")
|
||||||
@ApiOperation("强制完成")
|
@ApiOperation("强制完成")
|
||||||
@PostMapping("/compelFinish")
|
@PostMapping("/compelFinish")
|
||||||
|
|||||||
@@ -93,6 +93,13 @@ public interface SlittingproductionplanService {
|
|||||||
*/
|
*/
|
||||||
void sendFinish(JSONObject whereJson);
|
void sendFinish(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入站完成
|
||||||
|
*
|
||||||
|
* @param whereJson /
|
||||||
|
*/
|
||||||
|
void inFinish(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强制完成
|
* 强制完成
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -269,6 +269,31 @@ public class SlittingproductionplanServiceImpl implements Slittingproductionplan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void inFinish(JSONObject whereJson) {
|
||||||
|
JSONArray data = whereJson.getJSONArray("data");
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan");
|
||||||
|
|
||||||
|
for (int i = 0; i < data.size(); i++) {
|
||||||
|
JSONObject json = data.getJSONObject(i);
|
||||||
|
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
|
if (StrUtil.isEmpty(jsonObject.getString("qzzno"))){
|
||||||
|
throw new BadRequestException("还未绑定气涨轴!");
|
||||||
|
}
|
||||||
|
HashMap map = new HashMap();
|
||||||
|
jsonObject.put("is_child_ps_ok","1");
|
||||||
|
jsonObject.put("status","05");
|
||||||
|
jsonObject.put("update_optid",currentUserId);
|
||||||
|
jsonObject.put("update_optname",currentUsername);
|
||||||
|
jsonObject.put("update_time",DateUtil.now());
|
||||||
|
tab.update(jsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void compelFinish(JSONObject whereJson) {
|
public void compelFinish(JSONObject whereJson) {
|
||||||
|
|||||||
@@ -238,6 +238,17 @@
|
|||||||
>
|
>
|
||||||
配送完成
|
配送完成
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
:disabled="crud.selections.length < 1"
|
||||||
|
@click="inFinish"
|
||||||
|
>
|
||||||
|
入站完成
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -577,6 +588,16 @@ export default {
|
|||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
inFinish() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
const data = {
|
||||||
|
'data': _selectData
|
||||||
|
}
|
||||||
|
crudSlittingproductionplan.inFinish(data).then(res => {
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
},
|
||||||
compelFinish() {
|
compelFinish() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
const data = {
|
const data = {
|
||||||
|
|||||||
@@ -48,6 +48,14 @@ export function sendFinish(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function inFinish(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/slittingproductionplan/inFinish',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function compelFinish(data) {
|
export function compelFinish(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/slittingproductionplan/compelFinish',
|
url: 'api/slittingproductionplan/compelFinish',
|
||||||
@@ -56,4 +64,4 @@ export function compelFinish(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, compelFinish }
|
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish }
|
||||||
|
|||||||
Reference in New Issue
Block a user