松下工位节拍PLC配置

tags/yfai-mes-ext-v1.0
yxw 1 year ago
parent 3af19e5765
commit 55cc86a9ac

@ -43,22 +43,33 @@ public interface ISxWorkCellTaktCollectPlcCfgService {
ListPager<SxWorkCellTaktCollectPlcCfg> querySxWorkCellTaktCollectPlcCfgByPager(SxWorkCellTaktCollectPlcCfg mesManageCode, Pager pager);
/**
*
*
*
* @param ids id
* @param userName
*/
@ApiOperation("软删扭矩管理信息")
@ApiOperation("批量软删数据")
int deleteWeaklySxWorkCellTaktCollectPlcCfgByIds(String[] ids, String userName);
/**
* /
* /
*
* @param ids id
* @param status
* @param userName
* @return
*/
@ApiOperation(value = "批量禁用/启用详情")
@ApiOperation(value = "批量禁用/启用数据有效性")
int updateSxWorkCellTaktCollectPlcCfgValid(String[] ids, int status, String userName);
/**
* /PLC
*
* @param ids id
* @param status
* @param userName
* @return
*/
@ApiOperation(value = "批量禁用/启用工位节拍PLC配置状态")
int updateSxWorkCellTaktCollectPlcCfgStatus(String[] ids, int status, String userName);
}

@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.*;
**/
@RestController
@Api(tags = "松下工位节拍PLC配置 控制层")
@RequestMapping(CommonConstWords.BASE_URL_MES + "/work-cell-takt")
@RequestMapping(CommonConstWords.BASE_URL_MES + "/sx/" + "/work-cell-takt-collect-plc-cfg")
public class SxWorkCellTaktCollectPlcCfgController {
public static final Logger LOGGER = LoggerFactory.getLogger(SxWorkCellTaktCollectPlcCfgController.class);
@ -99,6 +99,24 @@ public class SxWorkCellTaktCollectPlcCfgController {
}
}
@PutMapping(value = "/update-valid-batch")
@ApiOperation(value = "批量禁用/启用详情", notes = "批量禁用/启用详情")
public ResultBean updateSxWorkCellTaktCollectPlcCfgValid(String[] ids, int status) {
try {
ConvertBean.modelSafeArrayNumber(ids, true);
//登陆用户
SessionUser user = AuthUtil.getSessionUser();
workCellTaktCollectPlcCfgService.updateSxWorkCellTaktCollectPlcCfgValid(ids, status, user.getUserName());
return ResultBean.success("修改成功")
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException busExcep) {
return ResultBean.fail(busExcep);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
@PutMapping(value = "/update-status-batch")
@ApiOperation(value = "批量禁用/启用详情", notes = "批量禁用/启用详情")
public ResultBean updateSxWorkCellTaktCollectPlcCfgStatus(String[] ids, int status) {
@ -116,4 +134,22 @@ public class SxWorkCellTaktCollectPlcCfgController {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
@DeleteMapping(value = "/delete-batch")
@ApiOperation(value = "批量禁用/启用详情", notes = "批量禁用/启用详情")
public ResultBean deleteWeaklySxWorkCellTaktCollectPlcCfgByIds(String[] ids) {
try {
ConvertBean.modelSafeArrayNumber(ids, true);
//登陆用户
SessionUser user = AuthUtil.getSessionUser();
workCellTaktCollectPlcCfgService.deleteWeaklySxWorkCellTaktCollectPlcCfgByIds(ids, user.getUserName());
return ResultBean.success("修改成功")
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
} catch (ImppBusiException busExcep) {
return ResultBean.fail(busExcep);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
}

@ -118,7 +118,7 @@ public class SxWorkCellTaktCollectPlcCfgService implements ISxWorkCellTaktCollec
int num = workCellTaktCollectPlcCfgRepository.updateByHqlWhere(
wheres.toString(),
new String[]{MesExtConstWords.SYSTEM_SYNC_STATUS, MesExtConstWords.IS_VALID, MesExtConstWords.MODIFY_USER, MesExtConstWords.MODIFY_DATE_TIME},
new String[]{MesExtConstWords.SYSTEM_SYNC_STATUS, MesExtConstWords.IS_DELETED, MesExtConstWords.MODIFY_USER, MesExtConstWords.MODIFY_DATE_TIME},
new Object[]{MesExtEnumUtil.IF_SYNC_STATUS.NO_SYNC.getValue(), CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), userName, TimeTool.getNowTime(true)}
);
return num;
@ -136,4 +136,17 @@ public class SxWorkCellTaktCollectPlcCfgService implements ISxWorkCellTaktCollec
);
return num;
}
@Override
public int updateSxWorkCellTaktCollectPlcCfgValid(String[] ids, int status, String userName) {
StringBuffer wheres = new StringBuffer();
HqlPack.getInPack(String.join(",", ids), MesExtConstWords.ID, wheres);
int num = workCellTaktCollectPlcCfgRepository.updateByHqlWhere(
wheres.toString(),
new String[]{MesExtConstWords.SYSTEM_SYNC_STATUS, MesExtConstWords.STATUS, MesExtConstWords.MODIFY_USER, MesExtConstWords.MODIFY_DATE_TIME},
new Object[]{MesExtEnumUtil.IF_SYNC_STATUS.NO_SYNC.getValue(), status, userName, TimeTool.getNowTime(true)}
);
return num;
}
}

@ -39,7 +39,7 @@ public class SxWorkCellTaktCollectPlcCfg extends BaseBean implements Serializabl
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作中心代码")
@ApiParam("工代码")
private String workCellCode;
@Column(name = "PLC_CODE")

Loading…
Cancel
Save