|
@ -14,6 +14,7 @@ import com.ruoyi.system.mapper.BaseRequisitioningOrderMapper; |
|
|
import com.ruoyi.system.domain.BaseRequisitioningOrder; |
|
|
import com.ruoyi.system.domain.BaseRequisitioningOrder; |
|
|
import com.ruoyi.system.service.IBaseRequisitioningOrderService; |
|
|
import com.ruoyi.system.service.IBaseRequisitioningOrderService; |
|
|
import com.ruoyi.common.core.text.Convert; |
|
|
import com.ruoyi.common.core.text.Convert; |
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 请购单Service业务层处理 |
|
|
* 请购单Service业务层处理 |
|
@ -64,6 +65,7 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = NullPointerException.class) |
|
|
public int insertBaseRequisitioningOrder(BaseRequisitioningOrder baseRequisitioningOrder) |
|
|
public int insertBaseRequisitioningOrder(BaseRequisitioningOrder baseRequisitioningOrder) |
|
|
{ |
|
|
{ |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
@ -71,12 +73,15 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr |
|
|
baseRequisitioningOrder.setCreateTime(DateUtils.getNowDate()); |
|
|
baseRequisitioningOrder.setCreateTime(DateUtils.getNowDate()); |
|
|
baseRequisitioningOrder.setRequisitioningCode(redisCache.generateBillNo("QG")); |
|
|
baseRequisitioningOrder.setRequisitioningCode(redisCache.generateBillNo("QG")); |
|
|
List<BaseRequisitioningOrderChild> childList = baseRequisitioningOrder.getBaseRequisitioningOrderChildList(); |
|
|
List<BaseRequisitioningOrderChild> childList = baseRequisitioningOrder.getBaseRequisitioningOrderChildList(); |
|
|
for (BaseRequisitioningOrderChild child: childList) { |
|
|
int childSize = childList.size(); |
|
|
|
|
|
if (childSize > 0) { |
|
|
|
|
|
for (BaseRequisitioningOrderChild child : childList) { |
|
|
child.setQuoteId(baseRequisitioningOrder.getRequisitioningCode()); |
|
|
child.setQuoteId(baseRequisitioningOrder.getRequisitioningCode()); |
|
|
child.setCreateBy(loginName); |
|
|
child.setCreateBy(loginName); |
|
|
child.setCreateTime(DateUtils.getNowDate()); |
|
|
child.setCreateTime(DateUtils.getNowDate()); |
|
|
baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(child); |
|
|
baseRequisitioningOrderChildMapper.insertBaseRequisitioningOrderChild(child); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
return baseRequisitioningOrderMapper.insertBaseRequisitioningOrder(baseRequisitioningOrder); |
|
|
return baseRequisitioningOrderMapper.insertBaseRequisitioningOrder(baseRequisitioningOrder); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -87,6 +92,7 @@ public class BaseRequisitioningOrderServiceImpl implements IBaseRequisitioningOr |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = NullPointerException.class) |
|
|
public int updateBaseRequisitioningOrder(BaseRequisitioningOrder baseRequisitioningOrder) |
|
|
public int updateBaseRequisitioningOrder(BaseRequisitioningOrder baseRequisitioningOrder) |
|
|
{ |
|
|
{ |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|