app-退料接收
This commit is contained in:
parent
9c134fde80
commit
3da3fea251
|
|
@ -12,10 +12,7 @@ import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.aspectj.weaver.loadtime.Aj;
|
import org.aspectj.weaver.loadtime.Aj;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
@ -45,8 +42,8 @@ public class BackReceiveController extends BaseController {
|
||||||
* @return AjaxResult对象
|
* @return AjaxResult对象
|
||||||
*/
|
*/
|
||||||
@Log(title = "退料接收列表", businessType = BusinessType.QUERY)
|
@Log(title = "退料接收列表", businessType = BusinessType.QUERY)
|
||||||
@PostMapping("getbackReceiveList")
|
@GetMapping("getbackReceiveList")
|
||||||
public AjaxResult getbackReceiveList(@RequestBody BackApplyInfo record) {
|
public AjaxResult getbackReceiveList(BackApplyInfo record) {
|
||||||
try {
|
try {
|
||||||
List<BackApplyInfo> list =backReceiveService.getbackReceiveList(record);
|
List<BackApplyInfo> list =backReceiveService.getbackReceiveList(record);
|
||||||
return success(list);
|
return success(list);
|
||||||
|
|
@ -96,7 +93,7 @@ public class BackReceiveController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数量退料--管理方式为1的
|
* 编码退料--管理方式为0的
|
||||||
*
|
*
|
||||||
* @param record 查询条件
|
* @param record 查询条件
|
||||||
* @return AjaxResult对象
|
* @return AjaxResult对象
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
List<BackApplyInfo> wxList = backReceiveMapper.getWxList(record);
|
List<BackApplyInfo> wxList = backReceiveMapper.getWxList(record);
|
||||||
if(wxList!=null && wxList.size()>0){
|
if(wxList!=null && wxList.size()>0){
|
||||||
//插入任务表tm_task
|
//插入任务表tm_task
|
||||||
int newTaskId = insertTT(hgList,41);
|
int newTaskId = insertTT(wxList,41);
|
||||||
//插入协议任务表tm_task_agreement
|
//插入协议任务表tm_task_agreement
|
||||||
res = insertTTA(taskId,wxList);
|
res = insertTTA(taskId,wxList);
|
||||||
//插入维修记录表repair_apply_details
|
//插入维修记录表repair_apply_details
|
||||||
|
|
@ -125,13 +125,13 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
//待报废的创建报废任务,插入任务协议表
|
//待报废的创建报废任务,插入任务协议表
|
||||||
|
|
||||||
List<BackApplyInfo> bfList = backReceiveMapper.getBfList(record);
|
List<BackApplyInfo> bfList = backReceiveMapper.getBfList(record);
|
||||||
if(wxList!=null && wxList.size()>0){
|
if(bfList!=null && bfList.size()>0){
|
||||||
//插入任务表tm_task
|
//插入任务表tm_task
|
||||||
int newTaskId = insertTT(hgList,57);
|
int newTaskId = insertTT(bfList,57);
|
||||||
//插入协议任务表tm_task_agreement
|
//插入协议任务表tm_task_agreement
|
||||||
res = insertTTA(taskId,hgList);
|
res = insertTTA(taskId,bfList);
|
||||||
//插入维修记录表scrap_apply_details
|
//插入维修记录表scrap_apply_details
|
||||||
res = insertSAD(taskId,hgList);
|
res = insertSAD(taskId,bfList);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
throw new RuntimeException(e.getMessage());
|
throw new RuntimeException(e.getMessage());
|
||||||
|
|
@ -186,7 +186,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
applyInfo.setTaskType(taskType);
|
applyInfo.setTaskType(taskType);
|
||||||
String taskStatus="";
|
String taskStatus="";
|
||||||
if(41 == taskType){
|
if(41 == taskType){
|
||||||
taskStatus = "42";
|
taskStatus = "43";
|
||||||
}
|
}
|
||||||
if(57 == taskType){
|
if(57 == taskType){
|
||||||
taskStatus = "58";
|
taskStatus = "58";
|
||||||
|
|
|
||||||
|
|
@ -228,12 +228,6 @@
|
||||||
<if test="backNum != null">
|
<if test="backNum != null">
|
||||||
repair_num,
|
repair_num,
|
||||||
</if>
|
</if>
|
||||||
<if test="repairedNum != null">
|
|
||||||
repaired_num,
|
|
||||||
</if>
|
|
||||||
<if test="scrapNum != null">
|
|
||||||
scrap_num,
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
status,
|
status,
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -250,12 +244,9 @@
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
company_id,
|
company_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="backId != null">
|
<if test="id != null">
|
||||||
back_id,
|
back_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="repairer != null">
|
|
||||||
repairer,
|
|
||||||
</if>
|
|
||||||
create_time
|
create_time
|
||||||
)
|
)
|
||||||
values (
|
values (
|
||||||
|
|
@ -271,12 +262,6 @@
|
||||||
<if test="backNum != null">
|
<if test="backNum != null">
|
||||||
#{backNum},
|
#{backNum},
|
||||||
</if>
|
</if>
|
||||||
<if test="repairedNum != null">
|
|
||||||
#{repairedNum},
|
|
||||||
</if>
|
|
||||||
<if test="scrapNum != null">
|
|
||||||
#{scrapNum},
|
|
||||||
</if>
|
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
#{status},
|
#{status},
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -293,11 +278,8 @@
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
#{companyId},
|
#{companyId},
|
||||||
</if>
|
</if>
|
||||||
<if test="backId != null">
|
<if test="id != null">
|
||||||
#{backId},
|
#{id},
|
||||||
</if>
|
|
||||||
<if test="repairer != null">
|
|
||||||
#{repairer},
|
|
||||||
</if>
|
</if>
|
||||||
NOW()
|
NOW()
|
||||||
)
|
)
|
||||||
|
|
@ -609,8 +591,6 @@
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
|
||||||
WHERE
|
WHERE
|
||||||
# bai.company_id=#{companyId}
|
|
||||||
# and
|
|
||||||
tt.task_status>='38'
|
tt.task_status>='38'
|
||||||
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -643,10 +623,12 @@
|
||||||
SELECT
|
SELECT
|
||||||
tta.agreement_id as agreementId,
|
tta.agreement_id as agreementId,
|
||||||
bai.id,
|
bai.id,
|
||||||
|
bai.task_id as taskId,
|
||||||
bcd.type_id as typeId,
|
bcd.type_id as typeId,
|
||||||
bcd.back_num as backNum,
|
bcd.back_num as backNum,
|
||||||
bcd.parent_id as parentId,
|
bcd.parent_id as parentId,
|
||||||
bcd.create_by as createBy
|
bcd.create_by as createBy,
|
||||||
|
bcd.ma_id as maId
|
||||||
FROM
|
FROM
|
||||||
back_check_details bcd
|
back_check_details bcd
|
||||||
LEFT JOIN back_apply_info bai on bai.id=bcd.parent_id
|
LEFT JOIN back_apply_info bai on bai.id=bcd.parent_id
|
||||||
|
|
@ -661,10 +643,12 @@
|
||||||
SELECT
|
SELECT
|
||||||
tta.agreement_id as agreementId,
|
tta.agreement_id as agreementId,
|
||||||
bai.id,
|
bai.id,
|
||||||
|
bai.task_id as taskId,
|
||||||
bcd.type_id as typeId,
|
bcd.type_id as typeId,
|
||||||
bcd.back_num as backNum,
|
bcd.back_num as backNum,
|
||||||
bcd.parent_id as parentId,
|
bcd.parent_id as parentId,
|
||||||
bcd.create_by as createBy
|
bcd.create_by as createBy,
|
||||||
|
bcd.ma_id as maId
|
||||||
FROM
|
FROM
|
||||||
back_check_details bcd
|
back_check_details bcd
|
||||||
LEFT JOIN back_apply_info bai on bai.id=bcd.parent_id
|
LEFT JOIN back_apply_info bai on bai.id=bcd.parent_id
|
||||||
|
|
@ -678,10 +662,12 @@
|
||||||
SELECT
|
SELECT
|
||||||
tta.agreement_id as agreementId,
|
tta.agreement_id as agreementId,
|
||||||
bai.id,
|
bai.id,
|
||||||
|
bai.task_id as taskId,
|
||||||
bcd.type_id as typeId,
|
bcd.type_id as typeId,
|
||||||
bcd.back_num as backNum,
|
bcd.back_num as backNum,
|
||||||
bcd.parent_id as parentId,
|
bcd.parent_id as parentId,
|
||||||
bcd.create_by as createBy
|
bcd.create_by as createBy,
|
||||||
|
bcd.ma_id as maId
|
||||||
FROM
|
FROM
|
||||||
back_check_details bcd
|
back_check_details bcd
|
||||||
LEFT JOIN back_apply_info bai on bai.id=bcd.parent_id
|
LEFT JOIN back_apply_info bai on bai.id=bcd.parent_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue