| | |
| | | import org.springframework.web.bind.annotation.CrossOrigin;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | 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.RequestMethod;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | |
| | |
|
| | |
|
| | | @PostMapping(value = "/pageQuery")
|
| | | public OpResult<Page<DncProcessingDTO>> pageQuery(ComponentQueryDTO dto) {
|
| | | public OpResult<Page<DncProcessingDTO>> pageQuery(@RequestBody ComponentQueryDTO dto) {
|
| | |
|
| | | try {
|
| | | return OpResult.success(dncProcessingQueryService.pageQuery(dto)) ;
|
| | |
| | | */
|
| | | @PostMapping(value = "/save")
|
| | | public OpResult<Void> save(@RequestHeader(value = "mdc-token", defaultValue = "") String token,
|
| | | MachineMaintainDTO dto,HttpServletRequest request) {
|
| | | @RequestBody MachineMaintainDTO dto,HttpServletRequest request) {
|
| | |
|
| | | //JSONObject jsonResult = new JSONObject();
|
| | | //jsonResult.put("result", "SUCCESS");
|
| | |
| | |
|
| | | @RequestMapping(value = "/modify", method = RequestMethod.POST)
|
| | | public OpResult<Void> modify(@RequestHeader(value = "mdc-token", defaultValue = "") String token,
|
| | | MachineMaintainDTO dto,HttpServletRequest request) {
|
| | | @RequestBody MachineMaintainDTO dto,HttpServletRequest request) {
|
| | | accountTokenService.checkToken(token);
|
| | |
|
| | | try {
|
| | |
| | |
|
| | | try {
|
| | | //accountTokenService.checkToken(token);
|
| | | |
| | | accountEditService.remove(dto.getIds());
|
| | | }catch(Exception ex) {
|
| | | logger.error("修改台账错误",ex);
|
| | | return OpResult.fail(ex.getMessage());
|
| | | }
|
| | | return OpResult.success();
|
| | | /*
|
| | | JSONObject jsonResult = new JSONObject();
|
| | | jsonResult.put("result", "SUCCESS");
|
| | |
|
| | | String ids = request.getParameter("ids");
|
| | | if ((ids == null) || (ids.equals(""))) {
|
| | | return jsonResult;
|
| | | }
|
| | |
|
| | | String[] id = ids.split(",");
|
| | | for (String s : id) {
|
| | | |
| | | MdcMachineAccount mdcMachineAccountObj = new MdcMachineAccount();
|
| | | mdcMachineAccountObj.setId(Integer.parseInt(s));
|
| | | mdcMachineAccountMapper.delete(mdcMachineAccountObj);
|
| | | |
| | | |
| | | }
|
| | | |
| | | return jsonResult;
|
| | | */
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
| | | public class MachineMaintainDTO {
|
| | | private Integer id;
|
| | |
|
| | | /**
|
| | | * 统一编号
|
| | | */
|
| | | private String sn;
|
| | |
|
| | | /*
|
| | | * 保养类型,1:日常保养;2:一级保养;3:二级保养;4:三级保养
|
| | |
| | | public void setId(Integer id) {
|
| | | this.id = id;
|
| | | }
|
| | | public String getSn() {
|
| | | return sn;
|
| | | }
|
| | | public void setSn(String sn) {
|
| | | this.sn = sn;
|
| | | }
|
| | | |
| | | public Integer getStyle() {
|
| | | return style;
|
| | | }
|
| | |
| | | private Integer id;
|
| | |
|
| | | /**
|
| | | * 统一编号
|
| | | * 统一编号,来自台账
|
| | | */
|
| | | private String sn;
|
| | | private String uuid;
|
| | |
|
| | | /*
|
| | | * 保养类型,1:日常保养;2:一级保养;3:二级保养;4:三级保养
|
| | |
| | | public void setId(Integer id) {
|
| | | this.id = id;
|
| | | }
|
| | | public String getSn() {
|
| | | return sn;
|
| | | |
| | | public String getUuid() {
|
| | | return uuid;
|
| | | }
|
| | | public void setSn(String sn) {
|
| | | this.sn = sn;
|
| | | public void setUuid(String uuid) {
|
| | | this.uuid = uuid;
|
| | | }
|
| | | public Integer getStyle() {
|
| | | return style;
|
| | |
| | | // mdcMachineMapper.insert(mdcMachineObj);
|
| | | */
|
| | | account.setMachineId(generateMachineId());
|
| | | |
| | | account.setMachineName(dto.getMachineName());
|
| | | account.setUuid(dto.getUuid());
|
| | | account.setSpecification(dto.getSpecification());
|
| | | account.setType(dto.getType());
|
| | |
| | | select
|
| | | a.id,
|
| | | a.machine_id machineId,
|
| | | a.machine_name machineName,
|
| | | a.uuid,
|
| | | a.specification,
|
| | | a.type,
|