修改和报错问题
This commit is contained in:
parent
e41669ed0a
commit
e966326dbc
|
|
@ -128,4 +128,6 @@ public class TerminalQuery extends CommonParam {
|
|||
|
||||
|
||||
private Long terminalId;
|
||||
|
||||
private Long storeId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,11 +97,7 @@ public class WrkInfo extends BaseEntity {
|
|||
*/
|
||||
@TableField(value = "work_source")
|
||||
private Integer workSource;
|
||||
/**
|
||||
* 第三方 工单编号
|
||||
*/
|
||||
@TableField(value = "order_no")
|
||||
private String orderNo;
|
||||
|
||||
|
||||
/**
|
||||
* 业务员处理时间
|
||||
|
|
|
|||
|
|
@ -81,8 +81,7 @@ public class TerminalController {
|
|||
@PostMapping("/update")
|
||||
@RequiresPermissions("ins:terminal:update")
|
||||
public AjaxResult update(@RequestBody @Validated TerminalQuery query) {
|
||||
Terminal terminal = BeanUtil.copyProperties(query, Terminal.class);
|
||||
return AjaxResult.success(terminalService.updateById(terminal));
|
||||
return AjaxResult.success(terminalService.updateTerminalAndStore(query));
|
||||
}
|
||||
|
||||
@DeleteMapping(value = "/del/{terminalId}")
|
||||
|
|
|
|||
|
|
@ -56,5 +56,10 @@ public interface TerminalService extends IService<Terminal>{
|
|||
|
||||
JSONObject save(Store store, WrkIcbcJsReceive dto);
|
||||
|
||||
|
||||
int updateTerminalAndStore(TerminalQuery query);
|
||||
|
||||
|
||||
|
||||
JSONObject getTerMap(Long terminalId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import com.chushang.inspection.terminal.service.TerminalInsService;
|
|||
import com.chushang.inspection.terminal.service.TerminalService;
|
||||
import com.chushang.inspection.terminal.vo.StoreTerminalVO;
|
||||
import com.chushang.inspection.terminal.vo.TerminalVO;
|
||||
import com.chushang.inspection.utils.BeanCopyUtils;
|
||||
import com.chushang.inspection.utils.TaskConfigUtils;
|
||||
import com.chushang.inspection.work.dto.DispatchDTO;
|
||||
import com.chushang.inspection.work.dto.WrkIcbcJsReceive;
|
||||
|
|
@ -35,6 +36,7 @@ import com.chushang.system.feign.RemoteDeptService;
|
|||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chushang.inspection.terminal.mapper.TerminalMapper;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
|
@ -146,4 +148,14 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, Terminal> i
|
|||
return JSONObject.of("terminal", getById(terminalId), "terminalIns", terminalInsService.getById(terminalId));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateTerminalAndStore(TerminalQuery query) {
|
||||
Terminal terminal = BeanCopyUtils.copy(query, Terminal.class);
|
||||
updateById(terminal);
|
||||
Store store = BeanCopyUtils.copy(query, Store.class);
|
||||
storeService.updateById(store);
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ public class WrkInfoController {
|
|||
@PostMapping("/withdraw")
|
||||
@RequiresPermissions("wrk:withdraw")
|
||||
@SysLog(value = "工单撤回", businessType = BusinessType.DELETE)
|
||||
public AjaxResult withdraw(@RequestBody @Validated Delete delete) {
|
||||
public AjaxResult withdraw(@RequestBody @Validated Delete delete) throws Exception{
|
||||
wrkInfoService.withdraw(delete.getIds());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public interface WrkInfoService extends IService<WrkInfo> {
|
|||
|
||||
void submit(WrkInfoDTO info);
|
||||
|
||||
void withdraw(List<Long> ids);
|
||||
void withdraw(List<Long> ids) throws Exception;
|
||||
|
||||
void audit(AuditDTO audit);
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ public class WrkInfoServiceImpl extends ServiceImpl<WrkInfoMapper, WrkInfo> impl
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void withdraw(List<Long> ids) {
|
||||
public void withdraw(List<Long> ids) throws Exception{
|
||||
List<Integer> status = ListUtil.toList(1, 2, 5, 6, 7);
|
||||
LambdaQueryWrapper<WrkInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(WrkInfo::getWrkId, ids);
|
||||
|
|
|
|||
Loading…
Reference in New Issue