|
|
|
@ -8,7 +8,7 @@ import org.dromara.common.core.exception.user.UserException;
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
import org.dromara.common.tenant.helper.TenantHelper;
|
|
|
|
|
import org.dromara.pda.api.RemotePdaQmsApiService;
|
|
|
|
|
import org.dromara.pda.api.model.QcInspectionTaskBo;
|
|
|
|
|
import org.dromara.pda.api.model.RemoteQcInspectionTaskBo;
|
|
|
|
|
import org.dromara.pda.api.model.vo.RemoteDefectVo;
|
|
|
|
|
import org.dromara.qms.domain.QcInspectionTask;
|
|
|
|
|
import org.dromara.qms.domain.QcInspectionTaskDefect;
|
|
|
|
@ -22,7 +22,6 @@ import org.dromara.qms.service.IQcDefectDetailService;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
@ -62,14 +61,13 @@ public class RemoteQmsApiServiceImpl implements RemotePdaQmsApiService {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public R<Void> remoteSavePdaInspectionTask(QcInspectionTaskBo bo) {
|
|
|
|
|
QcInspectionTask qcInspectionTask = new QcInspectionTask();
|
|
|
|
|
qcInspectionTask = MapstructUtils.convert(bo, QcInspectionTask.class);
|
|
|
|
|
public R<Void> remoteSavePdaInspectionTask(RemoteQcInspectionTaskBo bo) {
|
|
|
|
|
QcInspectionTask qcInspectionTask = BeanUtil.toBean(bo, QcInspectionTask.class);
|
|
|
|
|
|
|
|
|
|
int i = qcInspectionTaskMapper.updateById(qcInspectionTask);
|
|
|
|
|
if (bo.getResult().equals("N")){
|
|
|
|
|
List<QcInspectionTaskDefect> qcInspectionTaskDefectList=BeanUtil.copyToList(bo.getQcInspectionTaskDefectBoList(),QcInspectionTaskDefect.class);
|
|
|
|
|
List<QcInspectionTaskDefect> qcInspectionTaskDefectList= BeanUtil.copyToList(bo.getQcInspectionTaskDefectBoList(),QcInspectionTaskDefect.class);
|
|
|
|
|
qcInspectionTaskDefectMapper.insertBatch(qcInspectionTaskDefectList);
|
|
|
|
|
}
|
|
|
|
|
if (i > 0) {
|
|
|
|
@ -77,4 +75,21 @@ public class RemoteQmsApiServiceImpl implements RemotePdaQmsApiService {
|
|
|
|
|
}
|
|
|
|
|
return R.fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
|
// public R<Void> remoteSavePdaInspectionTask(Long TaskId) {
|
|
|
|
|
// System.out.println(TaskId);
|
|
|
|
|
// return R.ok();
|
|
|
|
|
//// QcInspectionTask qcInspectionTask = MapstructUtils.convert(bo, QcInspectionTask.class);
|
|
|
|
|
//// int i = qcInspectionTaskMapper.updateById(qcInspectionTask);
|
|
|
|
|
//// if (bo.getResult().equals("N")){
|
|
|
|
|
//// List<QcInspectionTaskDefect> qcInspectionTaskDefectList=BeanUtil.copyToList(bo.getQcInspectionTaskDefectBoList(),QcInspectionTaskDefect.class);
|
|
|
|
|
//// qcInspectionTaskDefectMapper.insertBatch(qcInspectionTaskDefectList);
|
|
|
|
|
//// }
|
|
|
|
|
//// if (i > 0) {
|
|
|
|
|
//// return R.ok();
|
|
|
|
|
//// }
|
|
|
|
|
// // return R.fail();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|