|
|
@ -75,8 +75,13 @@ public class QualityManufacturingProcessServiceImpl implements IQualityManufactu |
|
|
|
//查询数据库中最大的编号
|
|
|
|
String maxCode = qualityManufacturingProcessMapper.findMaxRoundCode(prefix); |
|
|
|
String newCode = generateNewCode(prefix,maxCode); |
|
|
|
|
|
|
|
qualityManufacturingProcess.setManufacturingProcessId(newCode); |
|
|
|
|
|
|
|
//查询制程工序编号是否唯一
|
|
|
|
if (qualityManufacturingProcessMapper.existsByManufacturingProcessCode(qualityManufacturingProcess)) |
|
|
|
{ |
|
|
|
throw new BusinessException("该制程工序编号当前已存在!"); |
|
|
|
} |
|
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
|
qualityManufacturingProcess.setCreateBy(loginName); |
|
|
|
qualityManufacturingProcess.setCreateTime(DateUtils.getNowDate()); |
|
|
@ -119,9 +124,26 @@ public class QualityManufacturingProcessServiceImpl implements IQualityManufactu |
|
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
|
qualityManufacturingProcess.setUpdateBy(loginName); |
|
|
|
qualityManufacturingProcess.setUpdateTime(DateUtils.getNowDate()); |
|
|
|
//查询制程工序编号是否唯一
|
|
|
|
if (qualityManufacturingProcessMapper.existsByManufacturingProcessCode(qualityManufacturingProcess)) |
|
|
|
{ |
|
|
|
throw new BusinessException("该制程工序编号当前已存在!"); |
|
|
|
} |
|
|
|
return qualityManufacturingProcessMapper.updateQualityManufacturingProcess(qualityManufacturingProcess); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 品质管理制程工序详情 |
|
|
|
* |
|
|
|
* @param qualityManufacturingProcess 品质管理制程工序 |
|
|
|
* @return 结果 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public int qualityManufacturingProcessDetail(QualityManufacturingProcess qualityManufacturingProcess) |
|
|
|
{ |
|
|
|
return qualityManufacturingProcessMapper.updateQualityManufacturingProcess(qualityManufacturingProcess); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 删除品质管理制程工序对象 |
|
|
|
* |
|
|
|