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