Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b5518394da
|
|
@ -55,4 +55,6 @@ public interface BackReceiveMapper {
|
|||
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
||||
|
||||
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
||||
|
||||
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId,@Param("taskId") Integer taskId);
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import com.bonus.sgzb.app.domain.GlobalConstants;
|
|||
import com.bonus.sgzb.app.mapper.BackReceiveMapper;
|
||||
import com.bonus.sgzb.app.service.BackReceiveService;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -67,8 +68,16 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
public int setCodeBack(BackApplyInfo record) {
|
||||
int res;
|
||||
try{
|
||||
//todo 此处需要判断 接收数量是否大于退料数量或者查询待接收数量是否为0
|
||||
|
||||
BackApplyInfo[] arr = record.getArr();
|
||||
if (arr.length>0){
|
||||
for (int i=0;i< arr.length;i++){
|
||||
//根据maId和taskId查询是否已接收
|
||||
int re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(),record.getTaskId());
|
||||
if (re>0){
|
||||
throw new RuntimeException("该编码已接收");
|
||||
}
|
||||
}
|
||||
}
|
||||
int taskId = record.getTaskId();
|
||||
//修改任务状态
|
||||
res= updateTaskStatus(taskId,39);
|
||||
|
|
|
|||
|
|
@ -738,6 +738,16 @@
|
|||
ORDER BY
|
||||
bcd.create_time DESC
|
||||
</select>
|
||||
<select id="selectCodeByMaIdAndTaskId" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
back_check_details cbd
|
||||
LEFT JOIN back_apply_info bai ON bai.id = cbd.parent_id
|
||||
WHERE
|
||||
cbd.ma_id = #{maId}
|
||||
AND bai.task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue