修改金额
This commit is contained in:
parent
74d8064d6f
commit
1e870450ad
|
|
@ -1,6 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
|
|
@ -11,10 +16,20 @@
|
|||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/central" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="bns-public" />
|
||||
<option name="name" value="bns-public" />
|
||||
<option name="url" value="http://192.168.0.56:8081/repository/maven-public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -182,7 +182,7 @@ public class ExperimentalAppServiceImpl implements ExperimentalAppService {
|
|||
}
|
||||
BigDecimal nowMony = new BigDecimal("0");
|
||||
BigDecimal amount= new BigDecimal(experDevVo.getAmount());
|
||||
nowMony.add(devMony).add(amount);
|
||||
nowMony=nowMony.add(devMony).add(amount);
|
||||
//计算设备总金额
|
||||
experDevVo.setExperAmount(nowMony.toString());
|
||||
allMony=allMony.add(nowMony);
|
||||
|
|
|
|||
|
|
@ -461,4 +461,20 @@ public interface ExperimentalMapper {
|
|||
* @return OperationRecordDto
|
||||
*/
|
||||
OperationRecordDto getOperationRecord(ParamsDto data);
|
||||
|
||||
/**
|
||||
* 查询设备名称
|
||||
* @param devName
|
||||
* @return
|
||||
*/
|
||||
int getExperDevNumByName(String devName);
|
||||
|
||||
/**
|
||||
*插入数据
|
||||
* @param devName
|
||||
* @param devModule
|
||||
* @param devCode
|
||||
* @param time
|
||||
*/
|
||||
void insertExperDev(@Param("devName") String devName, @Param("devModule")String devModule,@Param("devCode") String devCode,@Param("time") String time);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import com.bonus.aqgqj.webResult.HttpStatus;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
|
@ -150,6 +151,7 @@ public class ExperimentalServiceImpl implements ExperimentalService {
|
|||
BigDecimal allMony = new BigDecimal("0");
|
||||
// 添加试验信息数据
|
||||
mapper.addExper(vo);
|
||||
insertExperDev(vo.getExperDev(),vo.getExperModule(),vo.getExperCode(),vo.getCheckTime());
|
||||
// 添加试验依据信息数据
|
||||
mapper.addConfigBasis(vo.getBasisVos(), vo.getId());
|
||||
//试验项金额
|
||||
|
|
@ -172,7 +174,7 @@ public class ExperimentalServiceImpl implements ExperimentalService {
|
|||
//计算设备总金额
|
||||
BigDecimal amount= new BigDecimal(experDevVo.getAmount());
|
||||
BigDecimal nowMony= new BigDecimal("0");
|
||||
nowMony.add(amount).add(devMony);
|
||||
nowMony=nowMony.add(amount).add(devMony);
|
||||
experDevVo.setExperAmount(nowMony.toString());
|
||||
allMony=allMony.add(nowMony);
|
||||
mapper.addExperDev(experDevVo, vo.getId());
|
||||
|
|
@ -202,6 +204,20 @@ public class ExperimentalServiceImpl implements ExperimentalService {
|
|||
return ServerResponse.createBySuccessMsg("操作成功");
|
||||
}
|
||||
|
||||
|
||||
@Async
|
||||
public void insertExperDev(String devName,String devModule,String devCode,String time){
|
||||
try{
|
||||
int num=mapper.getExperDevNumByName(devName);
|
||||
if(num<1){
|
||||
mapper.insertExperDev(devName,devModule,devCode,time);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ServerResponse editTestData(TestVo vo) {
|
||||
|
|
@ -260,6 +276,7 @@ public class ExperimentalServiceImpl implements ExperimentalService {
|
|||
}
|
||||
// 修改试验信息数据
|
||||
mapper.updateExper(vo);
|
||||
insertExperDev(vo.getExperDev(),vo.getExperModule(),vo.getExperCode(),vo.getCheckTime());
|
||||
// 添加试验依据信息数据
|
||||
mapper.addConfigBasis(vo.getBasisVos(), vo.getId());
|
||||
for (int i = 0; i < vo.getExperDevVos().size(); i++) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@
|
|||
tb_team tt ON ts.team_id = tt.id
|
||||
WHERE ts.del_flag = '0') aa
|
||||
GROUP BY teamName
|
||||
order by testCost desc
|
||||
limit 5
|
||||
</select>
|
||||
<select id="getCostRank" parameterType="com.bonus.aqgqj.app.entity.HomeAppVo" resultType="com.bonus.aqgqj.app.entity.HomeAppVo">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -633,4 +633,16 @@
|
|||
WHERE
|
||||
te.id = #{id}
|
||||
</select>
|
||||
<select id="getExperDevNumByName" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from tb_exper_device
|
||||
where dev_name=#{devName} AND del_flag=0
|
||||
</select>
|
||||
|
||||
<insert id="insertExperDev">
|
||||
insert into tb_exper_device(dev_name, dev_module, dev_code,
|
||||
contract_date, create_time, data_source,
|
||||
del_flag)
|
||||
values (#{devName}, #{devModule}, #{devCode}, #{time}, now(), 1, 0)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@
|
|||
left join tb_team tt on ts.team_id=tt.id
|
||||
where ts.del_flag='0'
|
||||
) aa group by teamName
|
||||
order by testCost desc
|
||||
limit 5
|
||||
</select>
|
||||
<select id="getCostRank" parameterType="com.bonus.aqgqj.basis.entity.vo.HomeVo" resultType="com.bonus.aqgqj.basis.entity.vo.HomeVo">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ function initTable(dataList, limit, page) {
|
|||
{field: "devName", title: "设备名称", unresize: true, align: "center"},
|
||||
{field: "devModule", title: "设备型号", unresize: true, align: "center"},
|
||||
{field: "devCode", title: "设备编号", unresize: true, align: "center"},
|
||||
{field: "contractDate", title: "试验校验日期", unresize: true, align: "center"},
|
||||
{field: "contractDate", title: "设备校验日期", unresize: true, align: "center"},
|
||||
{field: "createTime", title: "创建时间", unresize: true, align: "center"},
|
||||
{field: "updateTime", title: "更新时间", unresize: true, align: "center"},
|
||||
{field: "dataSource", title: "数据来源", unresize: true, align: "center",
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@
|
|||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>试验校验日期</label>
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备校验日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" lay-verify="required" id="devContractDate" name="devContractDate" placeholder="请选择日期">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>试验校验日期</label>
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备校验日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" readonly lay-verify="required" id="devContractDate" name="devContractDate" placeholder="请选择日期">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>试验校验日期</label>
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备校验日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" lay-verify="required" id="devContractDate" name="devContractDate" placeholder="请选择日期">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>试验校验日期</label>
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备校验日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" id="contractDate" name="contractDate" readonly
|
||||
lay-verify="required">
|
||||
|
|
|
|||
Loading…
Reference in New Issue