|
|
@@ -645,7 +645,8 @@ public class TimerServiceImpl implements TimerService {
|
|
|
"`status`, `predict_income`, `open`, `income`, `person`, `person_cost`, `material`, `other_cost`, " +
|
|
|
"`cost_sum`, `taxes`, `gross_profit`, `gross_margin`, `overhead`, `corporate_income_tax`, `net_profit`, " +
|
|
|
"`net_margin`, `format`, `customer_system`, `profit_loss`, `approach_date`, `level`, `notes`," +
|
|
|
- "`actual_work_hours`, `out_work_hours`, `out_person_cost`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
|
|
|
+ "`actual_work_hours`, `out_work_hours`, `out_person_cost`, `formInstanceId`) " +
|
|
|
+ "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
|
|
|
|
|
|
ps = connection.prepareStatement(sql);
|
|
|
DecimalFormat df = new DecimalFormat("#.0000");
|
|
|
@@ -697,6 +698,7 @@ public class TimerServiceImpl implements TimerService {
|
|
|
ps.setObject(26,dataList.get(i).get("numberField_midxu53t"));
|
|
|
ps.setObject(27,dataList.get(i).get("numberField_midxu53v"));
|
|
|
ps.setObject(28,dataList.get(i).get("numberField_midxu53w"));
|
|
|
+ ps.setObject(29,dataList.get(i).get("formInstanceId"));
|
|
|
ps.addBatch();
|
|
|
if (i%500==0){
|
|
|
ps.executeBatch();
|
|
|
@@ -2305,6 +2307,24 @@ public class TimerServiceImpl implements TimerService {
|
|
|
UtilExcel.exportMapAndListByTemplate(response, null, analysisList, ProjectAnalysis.class, fileName, "NC.xlsx");
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void deleteAnalysis(Map<String, Object> data) {
|
|
|
+ try {
|
|
|
+ Class.forName(driver);
|
|
|
+ Connection connection = DriverManager.getConnection(url, username, password);
|
|
|
+ String updateSql = "DELETE \n" +
|
|
|
+ "FROM\n" +
|
|
|
+ "\tlanyun_project_analysis \n" +
|
|
|
+ "WHERE\n" +
|
|
|
+ "\t1 = 1 \n" +
|
|
|
+ "\tAND formInstanceId = '"+ UtilMap.getString(data,"formInstanceId")+"' ";
|
|
|
+ PreparedStatement ps = connection.prepareStatement(updateSql);
|
|
|
+ ps.executeUpdate();
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 获取本年所有月时间戳
|
|
|
public List<Long> getAllTimestamp(){
|
|
|
LocalDate now = LocalDate.now();
|