forked from I3-YF/i3plus-mes-pcn-yfai
客户条码补打
parent
2ab2ecdb80
commit
31de710227
@ -0,0 +1,21 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintDataModel;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.bean.MesPrintedSnLog;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 条码打印记录表
|
||||||
|
* @Reference :
|
||||||
|
* @Author : junsheng.li
|
||||||
|
* @CreateDate 2024/10/16 13:10
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface IMesPrintedSnLogService {
|
||||||
|
|
||||||
|
@ApiOperation(value = "条码打印记录表")
|
||||||
|
MesPrintedSnLog getMesPrintedSnLog(String userName, String organizeCode, MesProduceSnPrintDataModel printDataModel);
|
||||||
|
|
||||||
|
@ApiOperation(value = "写入条码打印记录表")
|
||||||
|
void insertMesPrintedSnLog(MesPrintedSnLog mesPrintedSnLog,String userName);
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPrintedSnLogService;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesProduceSnPrintDataModel;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||||
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.bean.MesPrintedSnLog;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.repository.IMesPrintedSnLogRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 条码打印记录表
|
||||||
|
* @Reference :
|
||||||
|
* @Author : junsheng.li
|
||||||
|
* @CreateDate 2024/10/16 13:11
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class MesPrintedSnLogServiceImpl implements IMesPrintedSnLogService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesPrintedSnLogRepository mesPrintedSnLogRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MesPrintedSnLog getMesPrintedSnLog(String userName, String organizeCode, MesProduceSnPrintDataModel printDataModel) {
|
||||||
|
MesPrintedSnLog snLog = new MesPrintedSnLog();
|
||||||
|
BeanUtil.copyProperties(printDataModel, snLog);
|
||||||
|
snLog.setOrganizeCode(organizeCode);
|
||||||
|
snLog.setPrintData(JSONObject.toJSONString(printDataModel));
|
||||||
|
snLog.setPrintType(MesExtEnumUtil.PRINT_LOG_TYPE.PRINT_LOG_TYPE_10.getValue());
|
||||||
|
ConvertBean.serviceModelInitialize(snLog, userName);
|
||||||
|
return snLog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertMesPrintedSnLog(MesPrintedSnLog mesPrintedSnLog, String userName) {
|
||||||
|
MesPrintedSnLog snLog = new MesPrintedSnLog();
|
||||||
|
BeanUtil.copyProperties(mesPrintedSnLog, snLog, MesPcnExtConstWords.BASE_BEAN_FIELDS);
|
||||||
|
snLog.setPrintType(MesExtEnumUtil.PRINT_LOG_TYPE.PRINT_LOG_TYPE_20.getValue());
|
||||||
|
ConvertBean.serviceModelInitialize(snLog, userName);
|
||||||
|
mesPrintedSnLogRepository.insert(snLog);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue