|
@@ -188,6 +188,9 @@ public class TJobticketController extends BaseController {
|
|
|
@Log(title = "工作票", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody TJobticket tJobticket) {
|
|
|
+ if (StringUtils.isEmpty(tJobticket.getWhgzxkzh()) && StringUtils.isEmpty(tJobticket.getDhzyxkzh()) &&StringUtils.isEmpty(tJobticket.getXzkjxkzh()) &&StringUtils.isEmpty(tJobticket.getMbzyxkzh()) &&StringUtils.isEmpty(tJobticket.getGczyxkzh()) ){
|
|
|
+ return AjaxResult.error("票号不能为空");
|
|
|
+ }
|
|
|
if (tJobticket.getXpxp() != null && tJobticket.getXpxp().equals("12")) {
|
|
|
int i = tJobticketMapper.countXp(tJobticket);
|
|
|
logger.info("预约票数量:" + i);
|
|
@@ -287,6 +290,9 @@ public class TJobticketController extends BaseController {
|
|
|
@Log(title = "工作票", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody TJobticket tJobticket) {
|
|
|
+ if (StringUtils.isEmpty(tJobticket.getWhgzxkzh()) && StringUtils.isEmpty(tJobticket.getDhzyxkzh()) &&StringUtils.isEmpty(tJobticket.getXzkjxkzh()) &&StringUtils.isEmpty(tJobticket.getMbzyxkzh()) &&StringUtils.isEmpty(tJobticket.getGczyxkzh()) ){
|
|
|
+ return AjaxResult.error("票号不能为空");
|
|
|
+ }
|
|
|
ISysUserService sysUserService = (ISysUserService) SpringContextUtils.getBean("sysUserService");
|
|
|
StringBuilder contentUserUnit = new StringBuilder();
|
|
|
if (tJobticket.getUserUnit() != null) {
|
|
@@ -310,6 +316,9 @@ public class TJobticketController extends BaseController {
|
|
|
@PutMapping("/status")
|
|
|
public AjaxResult editStatus(@RequestBody TJobticket tJobticket) {
|
|
|
if ("18".equals(tJobticket.getZypzt())) {
|
|
|
+ if (StringUtils.isEmpty(tJobticket.getWhgzxkzh()) && StringUtils.isEmpty(tJobticket.getDhzyxkzh()) &&StringUtils.isEmpty(tJobticket.getXzkjxkzh()) &&StringUtils.isEmpty(tJobticket.getMbzyxkzh()) &&StringUtils.isEmpty(tJobticket.getGczyxkzh()) ){
|
|
|
+ return AjaxResult.error("票号不能为空");
|
|
|
+ }
|
|
|
//批量
|
|
|
return toAjax(tJobticketMapper.updateTJobticketStatus(tJobticket));
|
|
|
} else {
|