|
|
@ -16,6 +16,9 @@ import com.dsic.gj_erp.service.zyjh.YcldwInfoService;
|
|
|
|
import com.dsic.gj_erp.service.zyjh.YcldwService;
|
|
|
|
import com.dsic.gj_erp.service.zyjh.YcldwService;
|
|
|
|
import com.dsic.gj_erp.service.zyjh.ZyjhService;
|
|
|
|
import com.dsic.gj_erp.service.zyjh.ZyjhService;
|
|
|
|
import com.dsic.gj_erp.ws.WsHandler;
|
|
|
|
import com.dsic.gj_erp.ws.WsHandler;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.wsclient.Message;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.wsclient.WebSocketClientComponent;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.wsclient.WebSocketService;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@ -37,6 +40,9 @@ public class ZyjhController {
|
|
|
|
|
|
|
|
|
|
|
|
private final WsHandler wsHandler;
|
|
|
|
private final WsHandler wsHandler;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final WebSocketService webSocketService;
|
|
|
|
|
|
|
|
private final WebSocketClientComponent webSocketClientComponent;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 作业计划执行,派工&反馈
|
|
|
|
* 作业计划执行,派工&反馈
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -75,10 +81,27 @@ public class ZyjhController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
zyjhService.updateBatchById(list);
|
|
|
|
zyjhService.updateBatchById(list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dto.getAudioFlag()){
|
|
|
|
|
|
|
|
Message result = Message.result(webSocketClientComponent.getErpId(), "1");
|
|
|
|
|
|
|
|
webSocketService.sendMessage(result.toString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultBean<>();
|
|
|
|
return new ResultBean<>();
|
|
|
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
|
|
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
throw new ServiceException(10001,"属性字段不存在");
|
|
|
|
if (dto.getAudioFlag()){
|
|
|
|
|
|
|
|
Message result = Message.result(webSocketClientComponent.getErpId(), "0");
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
webSocketService.sendMessage(result.toString());
|
|
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
throw new ServiceException(10001,"执行失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
throw new ServiceException(10001,"反馈属性不存在");
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
throw new ServiceException(10001,"执行失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@PostMapping("zxweb")
|
|
|
|
@PostMapping("zxweb")
|
|
|
@ -121,8 +144,8 @@ public class ZyjhController {
|
|
|
|
List<DmYdjh> list = zyjhService.list(Wrappers.<DmYdjh>query()
|
|
|
|
List<DmYdjh> list = zyjhService.list(Wrappers.<DmYdjh>query()
|
|
|
|
//执行查询
|
|
|
|
//执行查询
|
|
|
|
.eq(StrUtil.isNotEmpty(search.getField()),search.getField(),search.getUser())
|
|
|
|
.eq(StrUtil.isNotEmpty(search.getField()),search.getField(),search.getUser())
|
|
|
|
.isNull(StrUtil.isEmpty(search.getField()),search.getField())
|
|
|
|
// .isNull(StrUtil.isEmpty(search.getField()),search.getField())
|
|
|
|
.eq(StrUtil.isNotEmpty(search.getZt()),"zt",search.getZt())
|
|
|
|
.eq(StrUtil.isNotEmpty(search.getZt()),"zt",search.getZt()).or(StrUtil.isNotEmpty(search.getZtHx()),it->it.eq("zt",search.getZtHx()))
|
|
|
|
.eq(StrUtil.isNotEmpty(search.getDcch()),"dcch",search.getDcch())
|
|
|
|
.eq(StrUtil.isNotEmpty(search.getDcch()),"dcch",search.getDcch())
|
|
|
|
.le(StrUtil.isNotEmpty(search.getJhrqField()),search.getJhrqField(), DateUtil.date().toString("yyyy/MM/dd"))
|
|
|
|
.le(StrUtil.isNotEmpty(search.getJhrqField()),search.getJhrqField(), DateUtil.date().toString("yyyy/MM/dd"))
|
|
|
|
//跟踪查询
|
|
|
|
//跟踪查询
|
|
|
|