Commit 3fa8051c authored by 竹天卫's avatar 竹天卫

fasdfsdaff

parent 69ba1013
...@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -1227,7 +1228,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -1227,7 +1228,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
* @param ids * @param ids
* @return * @return
*/ */
@Transactional @Transactional(rollbackFor = Exception.class,propagation = Propagation.NESTED)
@Override @Override
public BaseResponse<String> finishHandle(Integer[] ids) { public BaseResponse<String> finishHandle(Integer[] ids) {
LoginUser loginUser = userService.getLoginUser(); LoginUser loginUser = userService.getLoginUser();
...@@ -1264,12 +1265,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -1264,12 +1265,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//计算产值 //计算产值
if (sampleHandle.getContent() != null) { if (sampleHandle.getContent() != null) {
String[] handIdS = sampleHandle.getContent().split("、"); String[] handIdS = sampleHandle.getContent().split("、");
String illMessage = "";
for (String handleId : handIdS) { for (String handleId : handIdS) {
try { try {
iPrecipriceService.createPreciprice(sampleHandle.getUserId(),entrust.getId(),Integer.valueOf(handleId),0,sample.getId()); iPrecipriceService.createPreciprice(sampleHandle.getUserId(),entrust.getId(),Integer.valueOf(handleId),0,sample.getId());
}catch (Exception e){ }catch (Exception e){
System.out.println(e.getMessage());
return BaseResponse.errorMsg(e.getMessage()); return BaseResponse.errorMsg(e.getMessage());
} }
} }
} }
QueryWrapper<SampleHandle> sampleHandleWrapper = new QueryWrapper<>(); QueryWrapper<SampleHandle> sampleHandleWrapper = new QueryWrapper<>();
......
...@@ -18,7 +18,6 @@ import cn.wise.sc.cement.business.entity.SysGroup; ...@@ -18,7 +18,6 @@ import cn.wise.sc.cement.business.entity.SysGroup;
import cn.wise.sc.cement.business.entity.SysPost; import cn.wise.sc.cement.business.entity.SysPost;
import cn.wise.sc.cement.business.entity.SysUser; import cn.wise.sc.cement.business.entity.SysUser;
import cn.wise.sc.cement.business.entity.TeamGroup; import cn.wise.sc.cement.business.entity.TeamGroup;
import cn.wise.sc.cement.business.mapper.EntrustMapper;
import cn.wise.sc.cement.business.mapper.PrecipriceMapper; import cn.wise.sc.cement.business.mapper.PrecipriceMapper;
import cn.wise.sc.cement.business.model.BaseResponse; import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.LoginUser; import cn.wise.sc.cement.business.model.LoginUser;
...@@ -43,6 +42,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -43,6 +42,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -73,8 +73,9 @@ import java.util.stream.Collectors; ...@@ -73,8 +73,9 @@ import java.util.stream.Collectors;
@Service @Service
public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Preciprice> implements IPrecipriceService { public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Preciprice> implements IPrecipriceService {
final final
EntrustMapper iEntrustService; IEntrustService iEntrustService;
final final
ISampleService iSampleService; ISampleService iSampleService;
final final
...@@ -96,7 +97,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr ...@@ -96,7 +97,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
final final
ISampleDistributionService iSampleDistributionService; ISampleDistributionService iSampleDistributionService;
public PrecipriceServiceImpl(EntrustMapper iEntrustService, public PrecipriceServiceImpl(IEntrustService iEntrustService,
ISampleService iSampleService, ISampleService iSampleService,
INormProductionService iNormProductionService, INormProductionService iNormProductionService,
ISysUserService iSysUserService, ISysUserService iSysUserService,
...@@ -121,7 +122,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr ...@@ -121,7 +122,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class,propagation = Propagation.NESTED)
public boolean createPreciprice(final Integer userId, final Integer entrustId, public boolean createPreciprice(final Integer userId, final Integer entrustId,
final Integer targetId, final Integer type, final Integer targetId, final Integer type,
final Integer sampleId) { final Integer sampleId) {
...@@ -132,7 +133,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr ...@@ -132,7 +133,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
Assert.notNull(sampleId, "样品id不能为空!"); Assert.notNull(sampleId, "样品id不能为空!");
Assert.notNull(type, "处理项类型不能为空!"); Assert.notNull(type, "处理项类型不能为空!");
//获取项目编号和名字 //获取项目编号和名字
Entrust entrust = iEntrustService.selectById(entrustId); Entrust entrust = iEntrustService.getById(entrustId);
if (BeanUtil.isEmpty(entrust)) { if (BeanUtil.isEmpty(entrust)) {
log.debug("产值记录新增失败,项目没找到!"); log.debug("产值记录新增失败,项目没找到!");
throw new IllegalArgumentException("无效的项目id!"); throw new IllegalArgumentException("无效的项目id!");
......
...@@ -1980,11 +1980,7 @@ ...@@ -1980,11 +1980,7 @@
<!-- 这里是开头 --> <!-- 这里是开头 -->
<#list list as iteam> <#list list as iteam>
<#--<w:tr wsp:rsidR="007E280A" wsp:rsidRPr="003B3488" wsp:rsidTr="003B3488">--> <w:tr wsp:rsidR="007E280A" wsp:rsidRPr="003B3488" wsp:rsidTr="003B3488">
<TEXTAREA COLS="125" placeholder="选填部分,可以不填写。如果有需要说明的事项,填写在此处!"
style="overflow-y:hidden;height:100px;"
onpropertychange="this.style.height=this.scrollHeight+'px';"
oninput="this.style.height=this.scrollHeight+'px';">
<w:trPr> <w:trPr>
<w:trHeight w:h-rule="exact" w:val="600"/> <w:trHeight w:h-rule="exact" w:val="600"/>
<w:jc <w:jc
...@@ -2130,6 +2126,7 @@ ...@@ -2130,6 +2126,7 @@
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
<w:tc> <w:tc>
<w:tcPr> <w:tcPr>
<w:tcW w:w="1754" w:type="dxa"/> <w:tcW w:w="1754" w:type="dxa"/>
...@@ -2180,8 +2177,7 @@ ...@@ -2180,8 +2177,7 @@
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
</TEXTAREA> </w:tr>
<#--</w:tr>-->
</#list> </#list>
<!-- 这里是结尾 --> <!-- 这里是结尾 -->
<!-- ################################################################################################## --> <!-- ################################################################################################## -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment